Paul Smith | 16 May 2013 21:42
Picon

[GDB 7.6/GCC 4.8.0] Slowdown in GDB macro processing for cores?

Hi all.  Is anyone aware of an issue with a big slowdown running macros
on core files?  I'm not sure if this is related to GCC 4.8 or GDB 7.6,
or what, but I'm seeing a 4x or more slowdown when running macros on
core files from previous releases.

Running against a live process is the same speed as before.

Details: we were building/debugging with the system compiler and
debugger (e.g., GCC 4.5.2 / GDB 7.2).  Speed of macros when dealing with
core files here was acceptable.  FYI, our code is C++ with a small to
moderate number of templates and compiled (in this case) with "-g", and
no optimization.

I wanted to use a new compiler with an encapsulated environment so we
could unify our build toolchain.  I created a separately-installed
version of GCC 4.8.0/binutils 2.23.2.

Then we discovered that trying to use older GDB instances with the
results of this build failed, because they couldn't read the DWARF4
object format generated by GCC 4.8.0.  I thought about dropping back to
an older DWARF format but instead I built GDB 7.6 and added that to our
toolchain.

Now we can debug and everything works well, except that we've noticed
this major slowdown only when debugging corefiles.

The macros are nothing fancy: they just walk through some of our data
structures printing interesting information; for example:

  set $current = $arg0.first
(Continue reading)

Avi Gozlan | 16 May 2013 14:30
Picon
Favicon

GDB and libthread_db.so.1 issue

Hello,

I have got a problem with debugging 32bit applications on a target x86_64 machine.

I use 64bit gdb 7.1 on a x86_64 machine (running 'file `which gdb`' returns ELF 64-bit LSB executable, AMD x86-64...)
I can debug 64bit applications successfully on this target machine. However, when trying to debug 32bit
applications, I get the following error message:
Cannot find new threads: generic error

Both libpthread.so.0 and libthread_db.so.1 were copied from another machine, both are located in
/lib64. (for the sake of trouble shooting I replaced also libc.so.6 and ld-linux-x86.so.2 with
libraries copied from that same machine).

When debugging gdb itself, I saw that indeed these shared libraries are loaded by gdb (by running 'info
shared'). Yet debugging fails with 32bit programs. The top of the gdb's backtrace for the failure is the following:

#0  thread_db_err_str (err=TD_ERR) at linux-thread-db.c:264
#1  0x0000000000497897 in find_new_threads_callback (th_p=0x7fffffffb760,
    data=0x7fffffffb840) at linux-thread-db.c:1306
#2  0x0000003154202000 in iterate_thread_list () from /lib64/libthread_db.so.1
#3  0x00000031542020b5 in td_ta_thr_iter () from /lib64/libthread_db.so.1
#4  0x0000000000497aea in find_new_threads_once (info=0xd38a50, iteration=0,
    errp=0x7fffffffb8c0) at linux-thread-db.c:1378
#5  0x0000000000497ccc in thread_db_find_new_threads_2 (ptid=...,
    until_no_new=0) at linux-thread-db.c:1445
#6  0x0000000000497d2b in thread_db_find_new_threads_1 (ptid=...)
    at linux-thread-db.c:1454
#7  0x00000000004976d9 in thread_db_wait (ops=0xb21ca0, ptid=...,
    ourstatus=0x7fffffffbad0, options=0) at linux-thread-db.c:1247
#8  0x0000000000588734 in target_wait (ptid=..., status=0x7fffffffbad0,
(Continue reading)

hitlar | 15 May 2013 12:50
Picon

Why gdb fail to make

Why gdb fail to make. i have already configure & make binutils-2.23.51-1,
gcc-core-3.4.4, gcc-c++-3.4.4 for target i386-elf (cygwin  version 2.774 and
window7),  but when i build gdb-7.6.50-2 it gives following error
Shine <at> Shine-PC /usr/src/gdb-elf-7.6.50-2
 ../gdb-7.6.50-2/configure --prefix=/usr/local/i386 --target=i386-elf

Shine <at> Shine-PC /usr/src/gdb-elf-7.6.50-2
$ make
make[1]: Entering directory `/usr/src/gdb-elf-7.6.50-2'
make[2]: Entering directory `/usr/src/gdb-elf-7.6.50-2/libiberty'
make[3]: Entering directory `/usr/src/gdb-elf-7.6.50-2/libiberty/testsuite'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/usr/src/gdb-elf-7.6.50-2/libiberty/testsuite'
make[2]: Leaving directory `/usr/src/gdb-elf-7.6.50-2/libiberty'
make[2]: Entering directory `/usr/src/gdb-elf-7.6.50-2/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/gdb-elf-7.6.50-2/intl'
make[2]: Entering directory `/usr/src/gdb-elf-7.6.50-2/bfd'
Making info in doc
make[3]: Entering directory `/usr/src/gdb-elf-7.6.50-2/bfd/doc'
make[3]: Nothing to be done for `info'.
make[3]: Leaving directory `/usr/src/gdb-elf-7.6.50-2/bfd/doc'
Making info in po
make[3]: Entering directory `/usr/src/gdb-elf-7.6.50-2/bfd/po'
make[3]: Nothing to be done for `info'.
make[3]: Leaving directory `/usr/src/gdb-elf-7.6.50-2/bfd/po'
make[3]: Entering directory `/usr/src/gdb-elf-7.6.50-2/bfd'
make[3]: Nothing to be done for `info-am'.
make[3]: Leaving directory `/usr/src/gdb-elf-7.6.50-2/bfd'
make  all-recursive
(Continue reading)

Christian Groessler | 15 May 2013 12:38

[patch]: testsuite: run bash instead of sh when using brace expansion

Hi,

I had some testsuite failures in gdb.dwarf2/dw2-dir-file-name.exp, 
because /bin/sh on my system doesn't support brace expansion.
I'm using Debian, where /bin/sh is in fact dash. I tried /bin/sh on 
Solaris (9), too, and it also doesn't support brace expansion.

This patch changes dw2-dir-file-name.exp to use bash instead of sh.

Ok to commit?

regards,
chris

gdb/testsuite:
2013-05-15  Christian Groessler <chris <at> groessler.org>

        * gdb.dwarf2/dw2-dir-file-name.exp: Use bash instead of sh, since
        brace expansion is not available in sh.

Index: gdb.dwarf2/dw2-dir-file-name.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp,v
retrieving revision 1.4
diff -u -p -r1.4 dw2-dir-file-name.exp
--- gdb.dwarf2/dw2-dir-file-name.exp    15 Mar 2013 01:41:28 -0000      1.4
+++ gdb.dwarf2/dw2-dir-file-name.exp    15 May 2013 10:27:20 -0000
 <at>  <at>  -322,10 +322,10  <at>  <at>  if { [gdb_compile "${asmsrcfile} ${srcdi
      return -1
  }
(Continue reading)

Diego Novillo | 9 May 2013 17:16
Picon
Favicon

GNU Tools Cauldron 2013 - An update on presentations


An update on this year's Cauldron.  We are getting close to the
limit on the presentations and BoFs, so if you are interested in
organizing a BoF or giving a presentation, please send us an
abstract soon.

We will still accept presentations and/or BoFs on-site the first
day of the workshop.  However, those will likely need to run in
parallel with the existing sessions.

We still do not have a formal schedule, but we are expecting to
have 3 pretty full days, starting on Fri 12/Jul.  I will send
details on the schedule as soon as we finalize it.

Please visit the wiki for more info http://gcc.gnu.org/wiki/cauldron2013

Diego.

Thomas Dineen | 8 May 2013 21:57
Picon

A Question On GDB?

Gentle People:

    I normally use GDB to find Segmentation Fault bugs such as
an uninitialized pointer. Usually I just use the "r" command and
the program runs until it crashes with GDB displaying the source
code file name and line number!

    But in the case shown below GDB dose NOT give me this
this useful information?

     Now the question: How can I find the crash point in the code?

Thanks for the help
Thomas Dineen

Sun5# gdb --args TA_Bench.sun
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.10"...
(gdb) r
Starting program: 
/net/Dineen-Linux4/home/tdineen/Projects/TA_Bench/TA_Bench.sun

warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
warning: Lowest section in /lib/libthread.so.1 is .dynamic at 00000074
(Continue reading)

Neal Kruis | 8 May 2013 21:53
Favicon
Gravatar

Can GDB be used to print values of allocatable arrays of a derived type in Fortran 90?

GDB users,

I just posted this question to Stack Overflow:

http://stackoverflow.com/questions/16447741/can-gdb-be-used-to-print-values-of-allocatable-arrays-of-a-derived-type-in-fortr

I have the following data structure in a Fortran90 program:

TYPE derivedType
  CHARACTER(100)     :: name      = ' '
  INTEGER            :: type      = 0
  REAL(KIND(1.0D0))  :: property  = 0.0
END TYPE derivedType

TYPE (derivedType), ALLOCATABLE, DIMENSION(:) :: arrayOfDerivedTypes

When I try to debug and print values in GDB like:

(gdb) p arrayOfDerivedTypes(1)%name

I get non-sensical values (often stings of zeros, forward slashes and
letters), or completely wrong values (like arrayOfDerivedTypes(1)%name
= 9, when I know that it is = 2). How can I get GDB to print the
correct values?

Background

I am aware of:

this bug: http://sourceware.org/bugzilla/show_bug.cgi?id=9395
(Continue reading)

Tejas Chopra | 8 May 2013 04:35
Favicon

Support for Overlays in target dependent code

Hi,

I am working on Xtensa architecture (gdb-7.*/gdb/xtensa-tdep.c). I wish 
to add overlay support for Xtensa. Seeing other similar architectures, I 
believe the only addition required for overlay support to seamlessly 
work (assuming no other changes in other target dependent code) would be:

set_gdbarch_overlay_update (gdbarch, simple_overlay_update);

in <target>_gdbarch_init(), just as is the case with regards to ARM and 
MIPS.

Is anything else required too?

Thanks!
Tejas

xunxun | 7 May 2013 11:12
Picon

Re: Doubt with gdb

于 2013/5/7 星期二 17:06, John Martin 写道:
> Hello,
>
> And, is it possible to extract only variables of a function?
>
> info variables return me all variables of program.
>
> info variables "function"  ????
>
>
> El 07/05/13 11:01, xunxun escribió:
>> 于 2013/5/7 星期二 16:58, John Martin 写道:
>>> Hello,
>>> is there any way to tell GDB that return all static variables of a 
>>> function?
>>> best regards.
>>>
>>>
>> |info variables |
>> || 
>> <http://sourceware.org/gdb/current/onlinedocs/gdb/Symbols.html#index-info-variables-918>
>> -- 
>> Best Regards,
>> xunxun
>
Maybe you need the local variables?

info local
>
> -- 
(Continue reading)

John Martin | 7 May 2013 10:58
Favicon

Doubt with gdb

Hello,
is there any way to tell GDB that return all static variables of a function?
best regards.

Suchakra Sharma | 6 May 2013 21:21
Picon
Picon
Favicon

Debugging agent library

Hi,

We tried to find out how to use the debugging agent library here [1] but
were unsuccessful. As of now, we have built a test app linked to dagent
which creates a socket file and expects commands. We wish to use it with
GDB as well as other applications to primarily objective of tracing
using GDB's fast tracepoint infra. Any help in this regard will be
appreciated. 

[1] https://github.com/MentorEmbedded/Debug-Agent-Library/wiki

Regards,
Suchakra & Simon

--
Suchakrapani Datt Sharma
Laboratorie DORSAL
École Polytechnique de Montréal


Gmane