public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/2492: gdb problem with  'malloc' in unnamed namespace
@ 2008-11-15  0:08 Tom Tromey
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2008-11-15  0:08 UTC (permalink / raw)
  To: nobody; +Cc: gdb-prs

The following reply was made to PR c++/2492; it has been noted by GNATS.

From: Tom Tromey <tromey@redhat.com>
To: gdb-gnats@sources.redhat.com, nobody@sources.redhat.com,
        apoenitz@trolltech.com, gdb-prs@sources.redhat.com
Cc:  
Subject: Re: c++/2492: gdb problem with  'malloc' in unnamed namespace
Date: Fri, 14 Nov 2008 17:03:04 -0700

 I tried this with CVS head today, and it worked fine.
 
 I made sure to do a test which actually allocates memory in the
 inferior (I think string constants no longer do just by themselves --
 so I added a function and passed the string constant to the function).
 
 Could you possibly try CVS gdb?
 
 I am interested in fixing this if I can reproduce it.
 
 Tom


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c++/2492: gdb problem with  'malloc' in unnamed namespace
@ 2008-08-13 18:18 Chris Newbold
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Newbold @ 2008-08-13 18:18 UTC (permalink / raw)
  To: nobody; +Cc: gdb-prs

The following reply was made to PR c++/2492; it has been noted by GNATS.

From: Chris Newbold <Chris.Newbold@mathworks.com>
To: "'gdb-gnats@sources.redhat.com'" <gdb-gnats@sources.redhat.com>
Cc:  
Subject: Re: c++/2492: gdb problem with  'malloc' in unnamed namespace
Date: Wed, 13 Aug 2008 14:11:21 -0400

 "Me too." We've got GNU gdb 6.4.90-debian and gcc version 4.2.3 and we've j=
 ust starting seeing the same problem. In our case, gdb is attempting to inv=
 oke a member function called 'malloc' of a class template.
 
 -Chris
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* c++/2492: gdb problem with  'malloc' in unnamed namespace
@ 2008-08-05 12:48 apoenitz
  0 siblings, 0 replies; 3+ messages in thread
From: apoenitz @ 2008-08-05 12:48 UTC (permalink / raw)
  To: gdb-gnats; +Cc: apoenitz


>Number:         2492
>Category:       c++
>Synopsis:       gdb problem with  'malloc' in unnamed namespace
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 05 12:48:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     apoenitz@trolltech.com
>Release:        gdb-6.8
>Organization:
>Environment:
Linux
>Description:
[Second try, so this might be a duplicate...]

Gdb loses its ability to use string literals in the CLI as soon as the inferior contains a function called 'malloc' in an anonymouse namespace.

See the thread containing Message-ID: <20080805121248.GB16949@caradoc.them.org>
for more details
>How-To-Repeat:
  echo 'namespace { void malloc(int, int) {} } int main() {}' | g++ -xc++ -g - 
  gdb -batch -ex 'b main' -ex 'r' -ex 'p "xxx"' ./a.out 

yields:
  [...]
  too few arguments in function call
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-15  0:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-15  0:08 c++/2492: gdb problem with 'malloc' in unnamed namespace Tom Tromey
  -- strict thread matches above, loose matches on Subject: below --
2008-08-13 18:18 Chris Newbold
2008-08-05 12:48 apoenitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).