diff options
Diffstat (limited to 'gdb/xstormy16-tdep.c')
-rw-r--r-- | gdb/xstormy16-tdep.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index eac5efd..5fcceb7 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -550,9 +550,12 @@ xstormy16_find_jmp_table_entry (CORE_ADDR faddr) if (osect < faddr_sect->objfile->sections_end) { - CORE_ADDR addr; - for (addr = osect->addr; - addr < osect->endaddr; addr += 2 * xstormy16_inst_size) + CORE_ADDR addr, endaddr; + + addr = obj_section_addr (osect); + endaddr = obj_section_endaddr (osect); + + for (; addr < endaddr; addr += 2 * xstormy16_inst_size) { LONGEST inst, inst2, faddr2; char buf[2 * xstormy16_inst_size]; |