Skip to content

Commit

Permalink
[Bugfix:Autograding] add dwarf 4 option to drmemory (#39)
Browse files Browse the repository at this point in the history
with g++11 it is necessary to compile with dwarf4 to get line numbers
from DrMemory

            "command" : "clang++ -g -gdwarf-4 -Wall -o a.out *.cpp",
// NOTE: Compiling with the -gdwarf-4 option is required with g++ 11+
            // so that DrMemory can print source code line numbers with.
            // See also:
            // DynamoRIO/drmemory#2485

Also, in PR Submitty/Submitty#9793 the category
for a system call previously in the unknown category is updated so that
the configuration runs without the system call failure.

---------

Co-authored-by: Barb Cutler <Barb Cutler>
  • Loading branch information
bmcutler authored Sep 22, 2023
1 parent ee27014 commit 1ff3d1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion examples/08_memory_debugging/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@
{
"type" : "Compilation",
"title" : "C++ - Compilation (for Dr Memory)",
"command" : "clang++ -g -Wall -o a.out *.cpp",

// ORIGINAL
//"command" : "clang++ -g -Wall -o a.out *.cpp",

// TEMPORARY WORKAROUND
"command" : "clang++ -g -gdwarf-4 -Wall -o a.out *.cpp",
// NOTE: Compiling with the -gdwarf-4 option is required with g++ 11+
// so that DrMemory can print source code line numbers with.
// See also:
// https://github.com/DynamoRIO/drmemory/issues/2485

"executable_name" : "a.out",
"points" : 2
},
Expand Down
2 changes: 1 addition & 1 deletion examples/18_postgres_database/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@
]
}
]
}
}

0 comments on commit 1ff3d1b

Please sign in to comment.