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]

dealing with remote flat binary floppy image (no debug symbols)


I'm exploring the above floppy image in qemu.
I'm new to this and its taking ages to find the addresses of instructions to
break on due to some relocation of code blocks and an absence of symbols.

I have two related questions which, if answered, could speed things up.
The first is how do you test an assembly instruction, operand or value of a
register and exit the script on a match?
The second is how do you exit a script and, rather than have the whole lot
shut down, keep the debug console open and transfer debugging to the user 

Here's a chunk of my gdb script

break *0x000001e8
continue
while 1
   disassemble (($cs<<4)+$eip) (($cs<<4)+$eip+1)
   stepi
end

If I don't keep doing something like disassembling EVERY instruction the
debug window closes on break.
What I'd like to be able to do is have the gdb script 
1) set things up so I don't have to type multiple lines into the console.
2) with a condition that exit's the script when it detects a match on an
instruction/operand or value of a register

eg 
while 1
   if ( (disassemble (($cs<<4)+$eip  == "carry") &&  (disassemble
(($cs<<4)+$eip+1  == "0x00004")) {
             exit loop & script 
             & 
             transfer operation to user keeping debug window open
   }
end 
I hope I've made my self clear and that this is possible??
Any help much appreciated


-- 
View this message in context: http://www.nabble.com/dealing-with-remote-flat-binary-floppy-image-%28no-debug-symbols%29-tp26048044p26048044.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.


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