By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,778 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,778 IT Pros & Developers. It's quick & easy.

gdb: insert assemble code but NOT machine?

P: n/a
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.

--
Learning is to improve, but not to prove.
--
Learning is to improve, but not to prove.

Nov 14 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Thu, 18 Dec 2003 08:42:05 +0800, "alphatan['a:lfa:ta2n]"
<DE***************@263.net> wrote in comp.lang.c:
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
Nov 14 '05 #2

P: n/a
alphatan wrote:
ASSUME:
1.There's no symbol table of my program.
2.gdb is my only choice.


http://sources.redhat.com/gdb/mailing-lists/

Nov 14 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.