Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Aleksey Midenkov <midenok@gmail.com>
To: Andreas Schwab <schwab@suse.de>
Cc: gdb@sourceware.org
Subject: Re: Break on library load before main
Date: Mon, 30 Jun 2014 12:00:00 -0000	[thread overview]
Message-ID: <CAF8BazAcHapt48DKxcighBe24V=SHbi5K7bxKqBdmEeLN5aaiA@mail.gmail.com> (raw)
In-Reply-To: <mvmzjgu4nqe.fsf@hawking.suse.de>

On Mon, Jun 30, 2014 at 3:54 PM, Andreas Schwab <schwab@suse.de> wrote:
> Aleksey Midenkov <midenok@gmail.com> writes:
>
>> I tried to stop execution before main() with following methods:
>>
>> 1. break dlopen
>> 2. catch load
>> 3. catch syscall uselib
>>
>> Nothing works! When I issue 'start', all libraries get loaded without
>> stop before main(). I should mention, that 'catch load' somehow works.
>> It stops somewhere, but very late (see attachment for output log).
>
> Try set stop-on-solib-events 1.
>

It also stops too late (after finished reading all symbols):

...
Reading symbols from /usr/lib/x86_64-linux-gnu/libogg.so.0...(no
debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libogg.so.0
Reading symbols from /lib/x86_64-linux-gnu/libresolv.so.2...Reading
symbols from /usr/lib/debug/lib/x86_64-linux-gnu/libresolv-2.19.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libresolv.so.2
Stopped due to shared library event:
  Inferior loaded /usr/lib/libkdecore.so.5
    /home/midenok/src/kde/kdevelop/stable/opt/lib/libkdevplatforminterfaces.so.7
    /home/midenok/src/kde/kdevelop/stable/opt/lib/libkdevplatformshell.so.7
    /usr/lib/libktexteditor.so.4
    /usr/lib/x86_64-linux-gnu/libQtDeclarative.so.4
    /usr/lib/libkdeclarative.so.5
    /home/midenok/src/kde/kdevelop/stable/opt/lib/libsublime.so.7
    /usr/lib/libkdeui.so.5
    /usr/lib/x86_64-linux-gnu/libQtDBus.so.4
    /usr/lib/x86_64-linux-gnu/libQtCore.so.4
    /usr/lib/x86_64-linux-gnu/libQtGui.so.4
    /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    /lib/x86_64-linux-gnu/libc.so.6
    /usr/lib/x86_64-linux-gnu/libQtNetwork.so.4
    /lib/x86_64-linux-gnu/libz.so.1
...

Strange message 'Inferior loaded ...'. It lists all libs loaded.
Shouldn't it stop on each lib one-by-one?


      reply	other threads:[~2014-06-30 12:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 11:17 Aleksey Midenkov
2014-06-30 11:54 ` Andreas Schwab
2014-06-30 12:00   ` Aleksey Midenkov [this message]

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='CAF8BazAcHapt48DKxcighBe24V=SHbi5K7bxKqBdmEeLN5aaiA@mail.gmail.com' \
    --to=midenok@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=schwab@suse.de \
    /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