All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: "Diego 'Flameeyes' Pettenò"
	<flameeyes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: pfunct crash on libSDL
Date: Mon, 10 Nov 2008 14:12:15 -0200	[thread overview]
Message-ID: <20081110161215.GC10009@ghostprotocols.net> (raw)
In-Reply-To: <m2wsfbineo.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Em Mon, Nov 10, 2008 at 04:57:51PM +0100, Diego 'Flameeyes' Pettenò escreveu:
> Arnaldo Carvalho de Melo <acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> writes:
> 
> > Humm, I see, its the other file in this tarball, the one without
> > debugging info, that makes the CTF code crash in pfunct, I'll fix that,
> > but please use the file with .debug suffix for now, its there that the
> > DWARF info is anyway :-)
> 
> Ah okay :) I'm used to just run on the main binary, hoping that the
> debug link is followed, I guess I'll have to change my process, but then
> I'll be feature-requesting for the debuglink to be followed :P

I thought that libdwfl would do that, lemme check... Yeah:

open("tmp/usr/lib64/libSDL-1.2.so.0.11.2", O_RDONLY) = 3
open("tmp/usr/lib64/libSDL-1.2.so.0.11.2.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tmp/usr/lib64/.debug/libSDL-1.2.so.0.11.2.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/acme/git/pahole/tmp/usr/lib64/libSDL-1.2.so.0.11.2.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/acme/git/pahole/tmp/usr/lib64/.debug/libSDL-1.2.so.0.11.2.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/debug/home/acme/git/pahole/tmp/usr/lib64/libSDL-1.2.so.0.11.2.debug", O_RDONLY) = -1 ENOENT (No such file or directory)

So its just a matter of using one of the searched places :-)

To try this I just did a 'yum install SDL-debuginfo' and:

acme@doppio pahole]$ pfunct -TVIlf SDL_PauseAudio
/usr/lib64/libSDL-1.2.so.0
/* <1b92> src/audio/SDL_audio.c:589 */
void SDL_PauseAudio(int pause_on);
{ /* low_pc=0x88b0 */
	SDL_AudioDevice * audio;                                // 590
}/* size: 20, variables: 1 */
[acme@doppio pahole]$

So it works, but this time by using build id :-)

[acme@doppio pahole]$ strace -e trace=open pfunct -TVIlf SDL_PauseAudio /usr/lib64/libSDL-1.2.so.0 2>&1 | grep debug
open("/usr/lib/debug/.build-id/06/5ae7d6742b683430474e3415ae5081be5586a7.debug", O_RDONLY) = 3
[acme@doppio pahole]$

But...

[acme@doppio pahole]$ l
/usr/lib/debug/.build-id/06/5ae7d6742b683430474e3415ae5081be5586a7.debug lrwxrwxrwx 1 root root 42 2008-11-10 14:08
/usr/lib/debug/.build-id/06/5ae7d6742b683430474e3415ae5081be5586a7.debug -> ../../usr/lib64/libSDL-1.2.so.0.11.2.debug*
[acme@doppio pahole]$

Let us try removing this symlink... It still works, but this time:

[acme@doppio pahole]$ strace -e trace=open pfunct -TVIlf SDL_PauseAudio /usr/lib64/libSDL-1.2.so.0 2>&1 | grep debug
open("/usr/lib/debug/.build-id/06/5ae7d6742b683430474e3415ae5081be5586a7.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libSDL-1.2.so.0.11.2.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/.debug/libSDL-1.2.so.0.11.2.debug", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/debug/usr/lib64/libSDL-1.2.so.0.11.2.debug", O_RDONLY) = 3
[acme@doppio pahole]$

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2008-11-10 16:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-09 19:25 pfunct crash on libSDL Diego 'Flameeyes' Pettenò
     [not found] ` <m21vxkk8gm.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-11-10 15:08   ` Arnaldo Carvalho de Melo
2008-11-10 15:57     ` Diego 'Flameeyes' Pettenò
     [not found]       ` <m2wsfbineo.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-11-10 16:12         ` Arnaldo Carvalho de Melo [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=20081110161215.GC10009@ghostprotocols.net \
    --to=acme-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=flameeyes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.