Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2013 15:29:50 +0100
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Martin Laabs <mailinglists@martinlaabs.de>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Debugging a  linux application and library in freebsd
Message-ID:  <20130104142950.GA12191@dft-labs.eu>
In-Reply-To: <50E6D903.7080306@martinlaabs.de>
References:  <50E6D903.7080306@martinlaabs.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 04, 2013 at 02:28:35PM +0100, Martin Laabs wrote:
> Hi,
> 
> I'm currently searching a bug in the linuxulator concerning a libc
> function. Therefore it would be very helpful using gdb to trace the program
> not only instruction for instruction but also with the source code and full
> symbols.
> Building the linux binary that reproduce the bug is done in a VM running an
> somewhat old debian. Building it with debugging symbols is also no problem.
> I could also imagine to build the libc with debugging symbols (if not
> available in some binary packages)
> Would you suggest to do this with a cross compiler under the linuxulator
> enviroment or in the debian VM?
> 
> But anyway - the native gdb does not support linux binaries very well. So
> did anyone tried to run a linux gdb inside the linuxulator enviroment to
> trace the bug down into the library? Obviously the linux gdb does not know
> anything about the linux-call translation but this should be transparent to it.
> 

Afair linuxolator on amd64 does not support ptrace, therefore no gdb for
you.

However if this is still about
http://www.freebsd.org/cgi/query-pr.cgi?pr=174933 I don't think you need
it at this stage. You should be able to easly decipher arguments in
socketcall and check what these mean in Linux kernel. Also reading glibc
sources may be helpful.

-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130104142950.GA12191>