DMD Backend: Deciding instructions to use/avoid?

Andrew Wiley wiley.andrew.j at gmail.com
Fri Jun 10 01:07:44 PDT 2011


On Thu, Jun 9, 2011 at 5:58 PM, Nick Sabalausky <a at a.a> wrote:

> "Bernard Helyer" <b.helyer at gmail.com> wrote in message
> news:isdgdc$m3a$1 at digitalmars.com...
> > If you run the program in GDB, can you disassemble when the error is
> > given? That may give you the instruction the kernel is assasinating your
> > process for.
>
> I can try that if anyone can help walk me through it or at least point me
> to
> a good beginner's tutorial for gdb. I never use commandline debuggers, and
> I've never even touched gdb, so I don't have the slightest clue how to use
> it.
>
>
> 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.
You can find GDB basics at http://www.cs.cmu.edu/~gilpin/tutorial/ although
that tutorial doesn't include `disass`. I mostly learned it by firing it up
and typing `help`  :D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20110610/cb12c970/attachment.html>


More information about the Digitalmars-d-learn mailing list