This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix gdb.dwarf2/dwz.exp for thumb mode
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Sun, 14 Sep 2014 17:24:22 +0200
- Subject: Re: [PATCH] Fix gdb.dwarf2/dwz.exp for thumb mode
- Authentication-results: sourceware.org; auth=none
- References: <87siju7816 dot fsf at igel dot home> <87bnqil1bb dot fsf at codesourcery dot com>
Yao Qi <yao@codesourcery.com> writes:
> 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'.
(gdb) p main_label
$1 = {<text variable, no debug info>} 0x100004e0 <.main+12>
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."