mirror of
https://github.com/encounter/object-testfiles.git
synced 2026-07-10 12:18:40 -07:00
dwarf: files compiled with both -g1 and -g2 (#18)
This commit is contained in:
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
@@ -0,0 +1,30 @@
|
||||
#define SIZE 10000
|
||||
|
||||
const char *sarr[SIZE];
|
||||
|
||||
struct Foo
|
||||
{
|
||||
int a;
|
||||
void foo(int path);
|
||||
void bar(const char *s);
|
||||
};
|
||||
|
||||
void Foo::bar(const char *s) {
|
||||
int i;
|
||||
for (i = 0; i < SIZE; i++)
|
||||
sarr[i] = s;
|
||||
}
|
||||
|
||||
__attribute__((noinline))
|
||||
void Foo::foo(int path) {
|
||||
if (path)
|
||||
bar("hello");
|
||||
else
|
||||
bar("world");
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
Foo foo = {};
|
||||
foo.foo(argc);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
CFLAGS="-fdebug-prefix-map=`pwd`=/object/testfiles/dwarf -O3"
|
||||
g++-13 $CFLAGS base.cpp -o base-gcc-g1 -g1
|
||||
g++-13 $CFLAGS base.cpp -o base-gcc-g2 -g2
|
||||
clang++-18 $CFLAGS base.cpp -o base-clang-g1 -g1
|
||||
clang++-18 $CFLAGS base.cpp -o base-clang-g2 -g2
|
||||
Reference in New Issue
Block a user