This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix gdb.dwarf2/dwz.exp for thumb mode


Andreas Schwab <schwab@linux-m68k.org> writes:

>> -if { $main_length == "" } {
>> +set main_label_offset ""
>> +set test "p main_label"
>> +gdb_test_multiple $test $test {
>> +    -re ".* = {.*} $hex <main\\+($decimal)>.*\r\n$gdb_prompt $" {
>> +	set main_label_offset $expect_out(1,string)
>> +    }
>> +}
>
> This will also fail to match if assembler labels are prefixed.

If you meant 'main' could be prefixed to '_main' for example, then GDB
can get rid of the prefix on display.  On mingw target, function 'foo'
is prefixed to '_foo', but GDB still shows 'foo' rather than '_foo'.

$ i686-w64-mingw32-objdump -t 2.exe | grep foo
[ 64](sec  1)(fl 0x00)(ty  20)(scl   3) (nx 1) 0x00000560 _foo

Dump of assembler code from 0x401560 to 0x401565:
   0x00401560 <foo+0>:  push   %ebp
   0x00401561 <foo+1>:  mov    %esp,%ebp
-- 
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]