mirror of
https://github.com/gomson/TimothyLottes.github.io.git
synced 2026-08-04 14:48:49 +00:00
Add files via upload
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<html><head><link rel="stylesheet" href="style.css"></head><body><div class="page">
|
||||
<h1>20140921 - Using GDB Without Source and With Runtime Changing of Code</h1>
|
||||
<br>
|
||||
|
||||
Getting disassembly of code generated at runtime to verify dynamic code generation can be a slow process.
|
||||
On Linux, I just use gdb.
|
||||
Using gdb requires setting the breakpoint for run-time generated code
|
||||
after that code is generated by the application
|
||||
(if there is an easier way, I don't know it).
|
||||
Here is a quick example,<br>
|
||||
<br>
|
||||
<tt>
|
||||
Find the entry point of the ELF: readelf -a filename<br>
|
||||
Look for "Entry point address:" and write down address<br>
|
||||
Start gdb: gdb filename<br>
|
||||
Insert breakpoint, this example using 0x2c3 as entry point: break *0x2c3<br>
|
||||
Start program which will break at above entry point: run<br>
|
||||
Show disassembly with raw bytes example: disassemble /r 0x2c3,0x300<br>
|
||||
The "=>" shows the instruction pointer<br>
|
||||
Set another breakpoint to something after run-time generated code<br>
|
||||
Use the "continue" command to continue to that breakpoint<br>
|
||||
Show disassembly of the run-time generated code</tt><br>
|
||||
|
||||
</div></body></html>
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ O OOO ||..||OO||||||||||OOo || ||||||||||||| ||||OO|| |o| ||||||||OO||OOO
|
||||
<a href="20141010.html">20141010 - The Source of the Strange "Win7" Color Distortion?</a><br>
|
||||
<br>
|
||||
<a href="20140926.html">20140926 - Post Depth Coverage</a><br>
|
||||
<a href="20140921.html">20140921 - Using GDB Without Source and With Runtime Changing of Code</a><br>
|
||||
<br>
|
||||
<a href="20140826.html">20140826 - Scifi Reading Suggestion List From Twitters</a><br>
|
||||
<a href="20140823.html">20140823 - MinWM</a><br>
|
||||
|
||||
Reference in New Issue
Block a user