gdb: insert assemble code but NOT machine?

  • Thread starter alphatan['a:lfa:ta2n]
  • Start date
A

alphatan['a:lfa:ta2n]

ASSUME:
1.There's no symbol table of my program.
2.gdb, is my only choice.
3.disassembly code of my program(snatch):
0x08048340 <main+24>: push $0x804840d
0x08048345 <main+29>: call 0x8048268

Now, I want to set the second line to be 'nop'.
I've asked for this in other bbs.
Which the best way I get is :
set *(unsigned*)(main+29)=0x90
BUT, I think this is very unreadable.
Does any body know that, how can I modify some
line with *ASSEMBLE* but not *MACHINE CODE*??

Thanks.
 
J

Jack Klein

ASSUME:
1.There's no symbol table of my program.
2.gdb, is my only choice.
3.disassembly code of my program(snatch):

What is your question about the C programming language? If you want
information about using a debugger, ask in a newsgroup that supports
your compiler/OS combination. The C standard does not define anything
about debuggers.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,122
Messages
2,570,716
Members
47,282
Latest member
hopkins1988

Latest Threads

Top