This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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? 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]