aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-12-05 08:36:01 +0000
committerCorinna Vinschen <corinna@vinschen.de>2001-12-05 08:36:01 +0000
commit50f6fb4b7ad4b5071f7cd1d3b8507e528ed278ab (patch)
tree59d06fc928418861cfbdc83191ca961e3f4ee366 /gdb/arm-tdep.c
parent02da620696a4889e56061e9f9048c0624c8436eb (diff)
downloadgdb-50f6fb4b7ad4b5071f7cd1d3b8507e528ed278ab.zip
gdb-50f6fb4b7ad4b5071f7cd1d3b8507e528ed278ab.tar.gz
gdb-50f6fb4b7ad4b5071f7cd1d3b8507e528ed278ab.tar.bz2
* arm-tdep.c (arm_skip_prologue): Always skip prologue by scanning
the prologue if source is assembler.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index f7d91ed..afcc7f0 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -402,15 +402,24 @@ arm_skip_prologue (CORE_ADDR pc)
unsigned long inst;
CORE_ADDR skip_pc;
CORE_ADDR func_addr, func_end;
+ char *func_name;
struct symtab_and_line sal;
/* See what the symbol table says. */
- if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
+ if (find_pc_partial_function (pc, &func_name, &func_addr, &func_end))
{
- sal = find_pc_line (func_addr, 0);
- if ((sal.line != 0) && (sal.end < func_end))
- return sal.end;
+ struct symbol *sym;
+
+ /* Found a function. */
+ sym = lookup_symbol (func_name, NULL, VAR_NAMESPACE, NULL, NULL);
+ if (sym && SYMBOL_LANGUAGE (sym) != language_asm)
+ {
+ /* Don't use this trick for assembly source files. */
+ sal = find_pc_line (func_addr, 0);
+ if ((sal.line != 0) && (sal.end < func_end))
+ return sal.end;
+ }
}
/* Check if this is Thumb code. */