Reviewed and approved by Jim Blandy <jimb@codesourcery.com>

2006-05-11  Fred Fish  <fnf@specifix.com>
	* symtab.c (skip_prologue_using_sal): Handle single line functions
	like "foo(){}", which may optimize down to a single return inst.
This commit is contained in:
Fred Fish 2006-05-11 09:29:52 +00:00
parent 5e1b4a6d17
commit 576c202544
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-05-11 Fred Fish <fnf@specifix.com>
* symtab.c (skip_prologue_using_sal): Handle single line functions
like "foo(){}", which may optimize down to a single return inst.
2006-05-10 Steve Ellcey <sje@cup.hp.com> 2006-05-10 Steve Ellcey <sje@cup.hp.com>
* hppa-hpux-tdep.c (initialize_hp_cxx_exception_support): Remove * hppa-hpux-tdep.c (initialize_hp_cxx_exception_support): Remove

View File

@ -4030,6 +4030,11 @@ skip_prologue_using_sal (CORE_ADDR func_addr)
prologue_sal = find_pc_line (start_pc, 0); prologue_sal = find_pc_line (start_pc, 0);
if (prologue_sal.line != 0) if (prologue_sal.line != 0)
{ {
/* If there is only one sal that covers the entire function,
then it is probably a single line function, like
"foo(){}". */
if (prologue_sal.end == end_pc)
return start_pc;
while (prologue_sal.end < end_pc) while (prologue_sal.end < end_pc)
{ {
struct symtab_and_line sal; struct symtab_and_line sal;