[Skyeye-developer] Found a bug in gdb single-stepping code
Tomei Ningen
tomei.ningen at yahoo.com
Sun Aug 6 12:52:51 CST 2006
Hi,
I found a bug if you single step the very first instrution in the ELF image. I.e.,
skyeye -e linux -d
arm-elf-gdb linux
target remote localhost:12345
si
This would change the PC to 0x04, and execute the instruction there, regardless of the entry point of the ELF image.
The fix is simple. With 1.2.0-RC8 release, patch utils/debugger/arch_reg.c:
void gdbserver_step(){
if(!strcmp(skyeye_config.arch->arch_name,"arm")){
//chy 2006004-12
+++ state->NextInstr = RESUME; /* treat as PC change */
state->Reg[15]=ARMul_DoInstr (state);
}
}
I guess no one found this bug because the SkyEye developers are way past debugging the first instruction in your program :-)
- TN
---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gro.clinux.org/pipermail/skyeye-developer/attachments/20060805/a59053c4/attachment.htm
More information about the Skyeye-developer
mailing list