<div class="gmail_quote">On Thu, Jun 9, 2011 at 5:58 PM, Nick Sabalausky <span dir="ltr"><a@a.a></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

"Bernard Helyer" <<a href="mailto:b.helyer@gmail.com">b.helyer@gmail.com</a>> wrote in message<br>
news:isdgdc$m3a$1@digitalmars.com...<br>
<div class="im">> If you run the program in GDB, can you disassemble when the error is<br>
> given? That may give you the instruction the kernel is assasinating your<br>
> process for.<br>
<br>
</div>I can try that if anyone can help walk me through it or at least point me to<br>
a good beginner's tutorial for gdb. I never use commandline debuggers, and<br>
I've never even touched gdb, so I don't have the slightest clue how to use<br>
it.<br>
<br>
<br>
</blockquote></div>The short version is to run `gdb yourapp` which will get you into the GDB shell. Then `run` to actually start the app. It will halt and return to the shell when it hits the bad instruction, and you should type `disass` to view the assembly code of the current function. There will be a pointer (->, I think) pointing to the current instruction in the listing.<div>

You can find GDB basics at <a href="http://www.cs.cmu.edu/~gilpin/tutorial/">http://www.cs.cmu.edu/~gilpin/tutorial/</a> although that tutorial doesn't include `disass`. I mostly learned it by firing it up and typing `help`  :D</div>