From: Eli Zaretskii <eliz@elta.co.il>
To: "Vianney Lecroart" <lecroart@nevrax.com>
Cc: gdb@sources.redhat.com
Subject: Re: displaying source after and before the program counter
Date: Mon, 15 Dec 2003 14:16:00 -0000 [thread overview]
Message-ID: <uad5u1815.fsf@elta.co.il> (raw)
In-Reply-To: <000b01c3c2f9$35a1fe80$0901a8c0@vianneyl> (lecroart@nevrax.com)
> From: "Vianney Lecroart" <lecroart@nevrax.com>
> Date: Mon, 15 Dec 2003 11:50:09 +0100
>
> The problem is that CPhrase::update() is a big function in a cpp file. I
> would like to know the line where the call to mpvi.h:527 is made. I
> can't see it because the function is inlining and it's an accessor, so,
> it's called at least 50 times on this function.
>
> The question is: Is it possible to know where in the function ::update()
> the crash happened?
Without turning off the inlining, yes?
Well, one way to do that is to look at the machine code in frame #3
(by using the `disassemble' command), then compare that with the
assembly generated by the compiler for the source code in question.
For the latter, invoke GCC exactly as it is invoked to compile the cpp
file which includes mpvi.h, but with the -S switch instead of the -c
switch. (There are also switches that you can add to cause the
generated assembly to include source lines, which will make it easier
for you to associate the assembly with the source.)
HTH
next prev parent reply other threads:[~2003-12-15 14:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1071484872.21849.ezmlm@sources.redhat.com>
2003-12-15 10:50 ` Vianney Lecroart
2003-12-15 14:16 ` Eli Zaretskii [this message]
2003-12-15 15:47 ` Paul Koning
2003-12-15 15:53 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uad5u1815.fsf@elta.co.il \
--to=eliz@elta.co.il \
--cc=gdb@sources.redhat.com \
--cc=lecroart@nevrax.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox