public inbox for src-cvs@sourceware.org help / color / mirror / Atom feed
From: brobecke@sourceware.org To: src-cvs@sourceware.org Subject: gdb and binutils branch master updated. 403cb6b138c38faf72f7abc034db3505b9bdb82f Date: Thu, 14 Nov 2013 10:39:00 -0000 [thread overview] Message-ID: <20131114103913.21017.qmail@sourceware.org> (raw) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via 403cb6b138c38faf72f7abc034db3505b9bdb82f (commit) from b5be8ce022f894831b133b3b424238d8058eb29e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=403cb6b138c38faf72f7abc034db3505b9bdb82f commit 403cb6b138c38faf72f7abc034db3505b9bdb82f Author: Joel Brobecker <brobecker@adacore.com> Date: Mon Nov 11 09:21:44 2013 +0400 GDB/MI: Add new "--language LANG" command option. Frontend sometimes need to evaluate expressions that are language-specific. For instance, Eclipse uses the following expression to determine the size of an address on the target: -data-evaluate-expression "sizeof (void*)" Unfortunately, if the main of the program being debugged is not C, this may not work. For instance, if the main is in Ada, you get... -data-evaluate-expression "sizeof (void*)" ^error,msg="No definition of \"sizeof\" in current context." ... and apparently decides to stop the debugging session as a result. The recommendation sent was to specifically set the language to C before trying to evaluate the expression. Something such as: 1. save current language 2. set language c 3. -data-evaluate-expression "sizeof (void*)" 4. Restore language This has the same disadvantages as the ones outlined in the "Context Management" section of the GDB/MI documentation regarding setting the current thread or the current frame, thus recommending the use of general command-line switches such as --frame, or --thread instead. This patch follows the same steps for the language, adding a similar new command option: --language LANG. Example of use: -data-evaluate-expression --language c "sizeof (void*)" ^done,value="4" gdb/ChangeLog: * mi/mi-parse.h (struct mi_parse) <language>: New field. * mi/mi-main.c (mi_cmd_execute): Temporarily set language to PARSE->LANGUAGE during command execution, if set. * mi/mi-parse.c: Add "language.h" #include. (mi_parse): Add parsing of "--language" command option. * NEWS: Add entry mentioning the new "--language" command option. gdb/testsuite/ChangeLog: * gdb.mi/mi-language.exp: New file. gdb/doc/ChangeLog: * gdb.texinfo (Show): Add xref anchor for "show language" command. (Context management): Place current subsection text into its own subsubsection. Add new subsubsection describing the "--language" command option. ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 10 +++++ gdb/NEWS | 2 + gdb/doc/ChangeLog | 7 ++++ gdb/doc/gdb.texinfo | 22 ++++++++++++ gdb/mi/mi-main.c | 7 ++++ gdb/mi/mi-parse.c | 25 +++++++++++++- gdb/mi/mi-parse.h | 4 ++ gdb/testsuite/ChangeLog | 4 ++ gdb/testsuite/gdb.mi/mi-language.exp | 62 ++++++++++++++++++++++++++++++++++ 9 files changed, 142 insertions(+), 1 deletions(-) create mode 100644 gdb/testsuite/gdb.mi/mi-language.exp hooks/post-receive -- gdb and binutils
reply other threads:[~2013-11-14 10:39 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20131114103913.21017.qmail@sourceware.org \ --to=brobecke@sourceware.org \ --cc=src-cvs@sourceware.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).