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


On 09/15/2014 08:25 PM, Yao Qi wrote:
> Subject: [PATCH] Fix gdb.dwarf2/dwz.exp for thumb mode
> 
> We see the fail in gdb.dwarf2/dwz.exp in thumb mode,
> 
> p the_int^M
> $2 = 99^M
> (gdb) FAIL: gdb.dwarf2/dwz.exp: p the_int
> 
> In thumb mode, the lsb of references to 'main' in the assembly
> (produced by dwarf assember) is set, so the generated debug
> information is incorrect.
> 
> in this patch, we add a label main_label inside function main.  Linker
> doesn't set its lsb in thumb mode, and we can get function main's
> address by 'main_label - $main_label_offset'.  This label isn't moved
> out of function main in both gcc and clang.
> 
> gdb/testsuite:
> 
> 2014-09-15  Yao Qi  <yao@codesourcery.com>
> 
> 	* gdb.dwarf2/main.c (main): New lable main_label.
> 	* gdb.dwarf2/dwz.exp: Get the offset of main_label to main.
> 	Return early if $main_label_offset is unknown.  Get address
> 	of main by "main_label - $main_label_offset".

Ping.  https://sourceware.org/ml/gdb-patches/2014-09/msg00497.html

-- 
Yao (éå)


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