From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Paul Smith <paul@mad-scientist.net>
Cc: "gdb\@sourceware.org" <gdb@sourceware.org>
Subject: Re: GDB can't parse variables named "memory" or "array"?
Date: Fri, 29 Sep 2017 18:57:00 -0000 [thread overview]
Message-ID: <87h8vle3j3.fsf@redhat.com> (raw)
In-Reply-To: <1506705739.6352.95.camel@mad-scientist.net> (Paul Smith's message of "Fri, 29 Sep 2017 13:22:19 -0400")
On Friday, September 29 2017, Paul Smith wrote:
> I've tried this with lots of different versions of GDB (7.7.1, 7.11,
> 7.12, etc.), and none of them work when debugging my programs (not just
> my main program but all my unit tests as well):
>
> (gdb) p memory
> A syntax error in expression, near `'.
>
> (gdb) p array
> A syntax error in expression, near `'.
Without a reproducer it's really hard to tell what's happening.
> Any ideas about what can I do to try to figure out what's happening
> here?
If you're not willing to share your code, you could debug GDB and see
what's happening. Compile it with debugging symbols (CFLAGS='-g3 -O0'
CXXFLAGS='-g3 -O0'), put a breakpoint on the "print_command" function,
and follow from there.
You can also enable "set debug parser on" and/or "set debug expression
1" inside your "faulty" GDB and see if it helps with anything.
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
next prev parent reply other threads:[~2017-09-29 18:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 17:23 Paul Smith
2017-09-29 18:57 ` Sergio Durigan Junior [this message]
2017-09-29 20:17 ` Paul Smith
2017-09-30 17:38 ` Paul Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h8vle3j3.fsf@redhat.com \
--to=sergiodj@redhat.com \
--cc=gdb@sourceware.org \
--cc=paul@mad-scientist.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox