This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: single stepping mips remote programs built with gcc 4.0
- From: "Newman, Sarah R" <sarah dot r dot newman at lmco dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 17 Nov 2005 14:23:17 -0800
- Subject: RE: single stepping mips remote programs built with gcc 4.0
> Could you please build a debuggable GDB binary, and trace through
> mips32_next_pc? It looks like it should handle the 'j' instruction
> just fine:
>
> case 2: /* J */
> case 3: /* JAL */
> {
> unsigned long reg;
> reg = jtype_target (inst) << 2;
> /* Upper four bits get never changed... */
> pc = reg + ((pc + 4) & 0xf0000000);
> }
> break;
>
> J and JAL share a format, so this should be correct. It's as if the
> value GDB is extracting for the instruction is incorrect.
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC
>
I built it with the default options, that good enough? Something like
"-g -O2" it seems.
I doubt that mips32_next_pc is getting compiled in because I can set a
breakpoint at mips_next_pc but not mips32_next_pc.
mips_software_single_step never gets called in this sequence, should it
be?