This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
c++/2492: gdb problem with 'malloc' in unnamed namespace
- From: apoenitz at trolltech dot com
- To: gdb-gnats at sources dot redhat dot com
- Cc: apoenitz at trolltech dot com
- Date: 5 Aug 2008 12:40:24 -0000
- Subject: c++/2492: gdb problem with 'malloc' in unnamed namespace
- Reply-to: apoenitz at trolltech dot com
>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: