mirror of
https://github.com/rui314/mold.git
synced 2024-10-04 08:37:28 +03:00
Merge pull request #470 from llunak/gdb-index-address-size
Gdb index address size
This commit is contained in:
commit
1b5735543f
@ -119,10 +119,16 @@ find_compunit(Context<E> &ctx, ObjectFile<E> &file, i64 offset) {
|
||||
case 3:
|
||||
case 4:
|
||||
abbrev_offset = *(u32 *)(cu + 6);
|
||||
if (u32 address_size = cu[10]; address_size != E::word_size)
|
||||
Fatal(ctx) << file << ": --gdb-index: unsupported address size "
|
||||
<< address_size;
|
||||
cu += 11;
|
||||
break;
|
||||
case 5: {
|
||||
abbrev_offset = *(u32 *)(cu + 8);
|
||||
if (u32 address_size = cu[7]; address_size != E::word_size)
|
||||
Fatal(ctx) << file << ": --gdb-index: unsupported address size "
|
||||
<< address_size;
|
||||
|
||||
switch (u32 unit_type = cu[6]; unit_type) {
|
||||
case DW_UT_compile:
|
||||
|
@ -49,7 +49,7 @@ readelf -WS $t/exe 2> /dev/null | fgrep -q .gdb_index
|
||||
|
||||
$QEMU $t/exe | grep -q 'Hello world'
|
||||
|
||||
DEBUGINFOD_URLS= gdb $t/exe -batch -ex 'b main' -ex r -ex 'b trap' \
|
||||
DEBUGINFOD_URLS= gdb $t/exe -nx -batch -ex 'b main' -ex r -ex 'b trap' \
|
||||
-ex c -ex bt -ex quit >& $t/log
|
||||
|
||||
grep -Pq 'hello \(\) at .*<stdin>:7' $t/log
|
||||
|
@ -60,7 +60,7 @@ readelf -WS $t/exe 2> /dev/null | fgrep -q .gdb_index
|
||||
|
||||
$QEMU $t/exe | grep -q 'Hello world'
|
||||
|
||||
DEBUGINFOD_URLS= gdb $t/exe -batch -ex 'b main' -ex r -ex 'b trap' \
|
||||
DEBUGINFOD_URLS= gdb $t/exe -nx -batch -ex 'b main' -ex r -ex 'b trap' \
|
||||
-ex c -ex bt -ex quit >& $t/log
|
||||
|
||||
grep -Pq 'hello2 \(\) at .*<stdin>:7' $t/log
|
||||
|
@ -60,7 +60,7 @@ readelf -WS $t/exe 2> /dev/null | fgrep -q .gdb_index
|
||||
|
||||
$QEMU $t/exe | grep -q 'Hello world'
|
||||
|
||||
DEBUGINFOD_URLS= gdb $t/exe -batch -ex 'b main' -ex r -ex 'b trap' \
|
||||
DEBUGINFOD_URLS= gdb $t/exe -nx -batch -ex 'b main' -ex r -ex 'b trap' \
|
||||
-ex c -ex bt -ex quit >& $t/log
|
||||
|
||||
grep -Pq 'hello2 \(\) at .*<stdin>:7' $t/log
|
||||
|
@ -60,7 +60,7 @@ readelf -WS $t/exe 2> /dev/null | fgrep -q .gdb_index
|
||||
|
||||
$QEMU $t/exe | grep -q 'Hello world'
|
||||
|
||||
DEBUGINFOD_URLS= gdb $t/exe -batch -ex 'b main' -ex r -ex 'b trap' \
|
||||
DEBUGINFOD_URLS= gdb $t/exe -nx -batch -ex 'b main' -ex r -ex 'b trap' \
|
||||
-ex c -ex bt -ex quit >& $t/log
|
||||
|
||||
grep -Pq 'hello2 \(\) at .*<stdin>:7' $t/log
|
||||
|
@ -92,7 +92,7 @@ readelf -WS $t/exe 2> /dev/null | fgrep -q .gdb_index
|
||||
|
||||
$QEMU $t/exe | grep -q 'Hello world'
|
||||
|
||||
DEBUGINFOD_URLS= gdb $t/exe -batch -ex 'b main' -ex r -ex 'b trap' \
|
||||
DEBUGINFOD_URLS= gdb $t/exe -nx -batch -ex 'b main' -ex r -ex 'b trap' \
|
||||
-ex c -ex bt -ex quit >& $t/log
|
||||
|
||||
grep -Pq 'fn8 \(\) at .*/d.c:6' $t/log
|
||||
|
Loading…
Reference in New Issue
Block a user