From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: asmwarrior <asmwarrior@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Why running the next command will jump back to the previous line position
Date: Sat, 29 Oct 2011 07:42:00 -0000 [thread overview]
Message-ID: <20111029072237.GA3977@host1.jankratochvil.net> (raw)
In-Reply-To: <4EABA71D.600@gmail.com>
On Sat, 29 Oct 2011 09:11:25 +0200, asmwarrior wrote:
[...]
> This was quite strange, it looks like the instruction will return to some
> previous position. (I guess that the destructor of the "std::map" was
> called.
yes, objdump -dSC shows there:
std::map<int, std::string> m;
400bab: 48 8d 45 b0 lea -0x50(%rbp),%rax
400baf: 48 89 c7 mov %rax,%rdi
400bb2: e8 43 00 00 00 callq 400bfa <std::map<int, std::string, std::less<int>, std::allocator<std::pair<int const, std::string> > >::~map()>
400bb7: 89 d8 mov %ebx,%eax
> My question is: This behavior is quite anti-friendly,
Maybe GCC could produce there DW_LNS_negate_stmt so that the variable
declaration line is still shown in backtraces (if the destructor crashes) but
it is skipped over during stepping/nexting; but GDB currently would not show
such line in backtraces, GCC currently does not produce DW_LNS_negate_stmt
anyway.
Regards,
Jan
next prev parent reply other threads:[~2011-10-29 7:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-29 7:23 asmwarrior
2011-10-29 7:42 ` Jan Kratochvil [this message]
2011-10-29 7:49 ` asmwarrior
2011-10-29 10:39 ` Jan Kratochvil
2011-10-29 14:14 ` 陳韋任
2011-10-29 17:12 ` asmwarrior
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=20111029072237.GA3977@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=asmwarrior@gmail.com \
--cc=gdb@sourceware.org \
/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