summaryrefslogtreecommitdiff
path: root/gdb/ia64-tdep.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-03-22 02:11:11 +0000
committerKevin Buettner <kevinb@redhat.com>2001-03-22 02:11:11 +0000
commit875f2ca0fb2993622a6a6e270aa41bd38fccaa7a (patch)
treeadd57b5f01d0c33c263af9139c29183e9e4589c7 /gdb/ia64-tdep.c
parentfff56e4e4194865a1cae40d237385e423e314c50 (diff)
downloadgdb-875f2ca0fb2993622a6a6e270aa41bd38fccaa7a.tar.gz
* ia64-tdep.c (fetch_instruction): Warn about slot numbers greater
than two instead of generating an error.
Diffstat (limited to 'gdb/ia64-tdep.c')
-rw-r--r--gdb/ia64-tdep.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 5efd58a92a5..e46c4b46fb0 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -492,8 +492,25 @@ fetch_instruction (CORE_ADDR addr, instruction_type *it, long long *instr)
long long template;
int val;
+ /* Warn about slot numbers greater than 2. We used to generate
+ an error here on the assumption that the user entered an invalid
+ address. But, sometimes GDB itself requests an invalid address.
+ This can (easily) happen when execution stops in a function for
+ which there are no symbols. The prologue scanner will attempt to
+ find the beginning of the function - if the nearest symbol
+ happens to not be aligned on a bundle boundary (16 bytes), the
+ resulting starting address will cause GDB to think that the slot
+ number is too large.
+
+ So we warn about it and set the slot number to zero. It is
+ not necessarily a fatal condition, particularly if debugging
+ at the assembly language level. */
if (slotnum > 2)
- error("Can't fetch instructions for slot numbers greater than 2.");
+ {
+ warning ("Can't fetch instructions for slot numbers greater than 2.\n"
+ "Using slot 0 instead");
+ slotnum = 0;
+ }
addr &= ~0x0f;