public inbox for archer-commits@sourceware.org help / color / mirror / Atom feed
From: tromey@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-tromey-python: gdb Date: Mon, 15 Dec 2008 22:38:00 -0000 [thread overview] Message-ID: <20081215223858.2127.qmail@sourceware.org> (raw) The branch, archer-tromey-python has been updated via 3af011f203616a293e1d709fe074e5eb8e62660d (commit) from 7a5b414ecee8a41ec23abf555747f521e7e82c05 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 3af011f203616a293e1d709fe074e5eb8e62660d Author: Tom Tromey <tromey@redhat.com> Date: Mon Dec 15 15:38:17 2008 -0700 gdb * python/python.c (gdbpy_new_objfile): Look in debug_file_directory as well. gdb/doc * gdb.texinfo (Auto-loading): Document debug-file-directory search. ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 5 +++++ gdb/doc/ChangeLog | 5 +++++ gdb/doc/gdb.texinfo | 15 +++++++++++---- gdb/python/python.c | 17 +++++++++++++++++ 4 files changed, 38 insertions(+), 4 deletions(-) First 500 lines of diff: diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d147835..6828a6a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2008-12-15 Tom Tromey <tromey@redhat.com> + * python/python.c (gdbpy_new_objfile): Look in + debug_file_directory as well. + +2008-12-15 Tom Tromey <tromey@redhat.com> + * python/python.c (print_children): Wrap after ",". 2008-12-15 Tom Tromey <tromey@redhat.com> diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 2f87e4c..bac5d78 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,5 +1,10 @@ 2008-12-15 Tom Tromey <tromey@redhat.com> + * gdb.texinfo (Auto-loading): Document debug-file-directory + search. + +2008-12-15 Tom Tromey <tromey@redhat.com> + * gdb.texinfo (Basic Python): Document gdb.breakpoints. (Breakpoints in Python): New node. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index dedf24b..1ada58b 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -18192,10 +18192,17 @@ traceback. When a new object file (@pxref{Objfiles in Python}) is read (for example, due to the @code{file} command, or because the inferior has loaded a shared library), @value{GDBN} will look for a file named by -adding @samp{-gdb.py} to the object file's name. If this file exists -and is readable, @value{GDBN} will evaluate it as a Python script. -Note that, if a separate debug file is used, @value{GDBN} will look -for the @samp{-gdb.py} file both in the directory associated with the +adding @samp{-gdb.py} to the object file's real name (the name formed +after following all symlinks and resolving @code{.} and @code{..} +components). If this file exists and is readable, @value{GDBN} will +evaluate it as a Python script. + +If this file does not exist, and if the parameter +@code{debug-file-directory} is set, then @value{GDBN} will append the +object file's real name to the value of this parameter, and try again. + +Also, if a separate debug file is used, @value{GDBN} will look for the +@samp{-gdb.py} file both in the directory associated with the application and the directory associated with the separate debug file. When reading a @samp{-gdb.py} file, @var{GDBN} sets the ``current diff --git a/gdb/python/python.c b/gdb/python/python.c index 9a1d321..fd84f60 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -741,6 +741,23 @@ gdbpy_new_objfile (struct objfile *objfile) input = fopen (filename, "r"); + if (!input && debug_file_directory) + { + /* Also try the same file in the separate debug info directory. */ + char *debugfile; + + debugfile = xmalloc (strlen (filename) + + strlen (debug_file_directory) + 1); + strcpy (debugfile, debug_file_directory); + /* FILENAME is absolute, so we don't need a "/" here. */ + strcat (debugfile, filename); + + xfree (filename); + filename = debugfile; + + input = fopen (filename, "r"); + } + if (input) { /* We don't want to throw an exception here -- but the user hooks/post-receive -- Repository for Project Archer.
next reply other threads:[~2008-12-15 22:38 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-12-15 22:38 tromey [this message] -- strict thread matches above, loose matches on Subject: below -- 2009-04-07 20:28 tromey 2009-03-24 17:27 tromey 2009-02-05 19:56 tromey 2008-12-17 23:10 tromey 2008-12-13 0:37 tromey 2008-12-12 23:54 tromey 2008-12-10 15:28 tromey 2008-12-09 0:33 tromey 2008-12-02 21:29 tromey 2008-12-01 19:10 tromey 2008-11-25 21:17 tromey 2008-11-21 18:25 tromey 2008-11-18 18:52 tromey 2008-11-18 15:54 tromey 2008-11-17 15:45 tromey 2008-11-16 22:18 tromey 2008-11-16 16:56 tromey 2008-11-12 1:54 tromey 2008-11-10 14:15 tromey 2008-11-06 21:11 tromey 2008-11-06 19:58 tromey 2008-10-23 22:27 tromey 2008-10-23 21:28 tromey 2008-10-22 18:18 tromey 2008-10-21 18:32 tromey
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=20081215223858.2127.qmail@sourceware.org \ --to=tromey@sourceware.org \ --cc=archer-commits@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).