From: Daniel Gutson <daniel.gutson@tallertechnologies.com>
To: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: break on C++ global objects ctors
Date: Mon, 31 Mar 2014 12:24:00 -0000 [thread overview]
Message-ID: <CAF5HaEU3nmr9Ak5dGByUPfe0JGn4NwHu_5JUpB7Fsn6CjfuzOw@mail.gmail.com> (raw)
In-Reply-To: <CAF5HaEU_5DhgydC0B7Ucx+owH3+PqsztZphAARzc80+9VBBtBA@mail.gmail.com>
PING for a maintainer please?
Thanks!
Daniel.
On Wed, Mar 26, 2014 at 3:22 PM, Daniel Gutson
<daniel.gutson@tallertechnologies.com> wrote:
> Hi,
>
> AFAIK, there is no command to break and debug the construction of
> global objects in C++.
>
> I'm looking for an equivalent command to "start" but instead of temp
> breaking at the
> beginning of main(), breaks at the beginning of every global ctor.
>
> The way I'm currently doing this in GNU Linux/x86_64 is:
> br __static_initialization_and_destruction_0
> which is a workaround, with the nice side effect that when asking info br, gdb
> shows all the source locations of the global object instances.
>
> I'm not sure whether this could supported by a native gdb feature or by a python
> extension.
> If there is consensus about the former, I might create some patch.
> However, I suspect that this might require some support from collect2 too,
> or some libc internals knowledge by gdb.
>
> Daniel.
--
Daniel F. Gutson
Chief Engineering Officer, SPD
San Lorenzo 47, 3rd Floor, Office 5
Córdoba, Argentina
Phone: +54 351 4217888 / +54 351 4218211
Skype: dgutson
next prev parent reply other threads:[~2014-03-31 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 18:22 Daniel Gutson
2014-03-31 12:24 ` Daniel Gutson [this message]
2014-03-31 13:56 ` Paul_Koning
2014-03-31 14:10 ` Daniel Gutson
2014-03-31 14:16 ` Paul_Koning
2014-03-31 14:41 ` Daniel Gutson
2014-09-26 18:00 ` Daniel Gutson
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=CAF5HaEU3nmr9Ak5dGByUPfe0JGn4NwHu_5JUpB7Fsn6CjfuzOw@mail.gmail.com \
--to=daniel.gutson@tallertechnologies.com \
--cc=gdb-patches@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