Add files via upload

This commit is contained in:
TimothyLottes
2016-11-12 09:14:40 -05:00
committed by GitHub
parent 1e1f88f748
commit 6b65409ac9
2 changed files with 27 additions and 0 deletions
+26
View File
@@ -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>
+1
View File
@@ -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>