aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-04-24 16:51:33 +0800
committerYao Qi <yao@codesourcery.com>2014-04-26 10:45:06 +0800
commit9730e6ccc4307a03ae2a0dd5c8a17a30fcf9b1f2 (patch)
tree3276cd4ee82bc798c7c6e0a68e60fd4e07586f4b /gdb/infrun.c
parentcec9d598f54503baaead6c8009a7998a0cd731fa (diff)
downloadgdb-9730e6ccc4307a03ae2a0dd5c8a17a30fcf9b1f2.zip
gdb-9730e6ccc4307a03ae2a0dd5c8a17a30fcf9b1f2.tar.gz
gdb-9730e6ccc4307a03ae2a0dd5c8a17a30fcf9b1f2.tar.bz2
Compute the function length instead of hard coding it
In Dwarf::assemble in dwz.exp, 10 is hard-coded in it, subprogram { {name main} {low_pc main addr} {high_pc "main + 10" addr} } however, the length of main function varies on architectures. The hard-coded 10 here causes dwz.exp fails on some targets, such as nios2. This patch is to add some code to compute the length of function main, which is similar to what we are doing in entry-values.exp. gdb/testsuite: 2014-04-26 Yao Qi <yao@codesourcery.com> * gdb.dwarf2/dwz.exp: Compile main.c to object. Restart GDB and compute the length of function main. Save it in $main_length. (Dwarf::assemble): Use $main_length instead of hard-coded 10. (top-level): Use gdb_compile to compile objects into executable and restart GDB. Remove invocation to prepare_for_testing.
Diffstat (limited to 'gdb/infrun.c')
0 files changed, 0 insertions, 0 deletions