This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error while debugging a program using

On 10/28/19 5:54 PM, Nisarg Shah wrote:
> OS: Ubuntu 18.04 64-bit
> System glibc: 2.27-3ubuntu1
> New glibc: built from master branch
> Hi all,
> I'm following steps from
> to install and use a
> new glibc alongside the default system installation. After building it
> and compiling a simple multithreaded program against it, when I try to
> run it under GDB using the, I get the following error -
> The multithreaded program is copied from
> Steps to compile the program -
> SYSROOT=/home/<user>/glibc-master (this is where I installed glibc
> using DESTDIR env variable)
> gcc \
>   -L${SYSROOT}/usr/lib64 \
>   -I${SYSROOT}/include \
>   --sysroot=${SYSROOT} \
>   -Wl,-rpath=${SYSROOT}/lib64 \
>   -Wl,--dynamic-linker=${SYSROOT}/lib64/\
>   -pthread /mnt/hd/pthreads_simple.c
> Steps followed to run GDB -
> $ cd /mnt/hd/glibc-master-build/
> $ ./ /mnt/hd/a.out


> Debugging glibc...
> Build directory  : /mnt/hd/glibc-master-build/
> Source directory : /mnt/hd/glibc
> GLIBC Testcase   : /mnt/hd/a.out
> GDB Commands     : /mnt/hd/glibc-master-build/debugglibc.gdb
> Env vars         :
> Reading symbols from /mnt/hd/glibc-master-build//elf/
> /mnt/hd/glibc-master-build/debugglibc.gdb:5: Error in sourced command file:
> ***The address where /mnt/hd/a.out has been loaded is missing***

This indicates that gdb had a problem determining where a.out should be lodaed.

This isn't normal.

Where did the toolchain you are using come from? Is the gcc you are using
part of your distribution? What distribution are you using?

> I'm not sure how to resolve this. This is the first time I'm
> attempting to build/install glib. Any help would be appreciated.

Can you try this?

./ ./nptl/tst-align

And see if debugging a normal glibc test case works?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]