This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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]

c++/2492: gdb problem with 'malloc' in unnamed namespace


>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:


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