public inbox for archer-commits@sourceware.org help / color / mirror / Atom feed
From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] jankratochvil/gdbserverbuildid-locate: sticky Date: Wed, 12 Aug 2015 15:39:00 -0000 [thread overview] Message-ID: <20150812153927.24271.qmail@sourceware.org> (raw) The branch, jankratochvil/gdbserverbuildid-locate has been updated discards 418401189cb3400e44e5fa27114025e8b539f4b3 (commit) via 1f37397f1b638f717f2bd0bc6e71fd6fc8e75d39 (commit) via cb87cc5840129399855923ab381d6a11ba502593 (commit) from 418401189cb3400e44e5fa27114025e8b539f4b3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 1f37397f1b638f717f2bd0bc6e71fd6fc8e75d39 Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Wed Aug 5 21:41:00 2015 +0200 sticky Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com> Philippe Waroquiers wrote: > On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote: > > Built and regtested on RHEL6.6 x86_64. > I tested with the last SVN version of the Valgrind gdbserver (that > supports qXfer:exec-file:read+). > > The patch introduces a regression: > with the patch, GDB does not anymore automatically load the > exec-file. > > I bypassed this problem by ignoring fake_pid_p in remote.c: > --- a/gdb/remote.c > +++ b/gdb/remote.c > @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int > attached, > inf->attach_flag = attached; > inf->fake_pid_p = fake_pid_p; > > - /* If no main executable is currently open then attempt to > - open the file that was executed to create this inferior. */ > - if (try_open_exec && get_exec_file (0) == NULL) > + /* Attempt to open the file that was executed to create this > + inferior. If the user has explicitly specified executable > + and/or symbol files then warn the user if their choices do > + not match. Otherwise, set exec_file and symfile_objfile to > + the new file. */ > + printf("fake_pid_p %d\n", fake_pid_p); > + if (try_open_exec)// && !fake_pid_p) > exec_file_locate_attach (pid, 1); > > Effectively, the printf shows that with Valgrind gdbsrv, > fake_pid_p value is 1. > > When ignoring fake_pid_p, GDB can properly attach > to different Valgrind gdbsrv, and changes of executable > as expected. Ah, it seems I mailed a bad patch, my apologies! I was working on two fixes that touched the same line, and it looks like I rebased them in the wrong order. This updated patch has been created against the latest gdb/master (80fb91378c91a8239817a5ab2b1c3e346109db25). Could you please try your tests again? Thanks, Gary --- On attach, GDB will only attempt to determine the main executable's filename if one is not already set. This causes problems if you attach to one process and then attach to another: GDB will not attempt to discover the main executable on the second attach. If the two processes have different main executable files then the symbols will now be wrong. This is PR gdb/17626. In GDB some filenames are supplied by the user (e.g. using the "file" or "symbol-file" commands) and some are determined by GDB (e.g. while processing an "attach" command). This commit updates GDB to track which filenames were supplied by the user. When GDB might attempt to determine an executable filename and one is already set, filenames determined by GDB may be overridden but user-supplied filenames will not. gdb/ChangeLog: PR gdb/17626 * progspace.h (struct program_space) <pspace_exec_file_is_user_supplied>: New field. <symfile_object_file_is_user_supplied>: Likewise. (symfile_objfile_is_user_supplied): New macro. * exec.h (exec_file_is_user_supplied): Likewise. * exec.c (exec_close): Clear exec_file_is_user_supplied. (exec_file_locate_attach): Remove get_exec_file check. Do not replace user-supplied executable or symbol files. Warn if user-supplied executable or symbol files do not match discovered file. (exec_file_command): Set exec_file_is_user_supplied. * symfile.c (symbol_file_clear): Clear symfile_objfile_is_user_supplied. (symbol_file_command): Set symfile_objfile_is_user_supplied. * inferior.c (add_inferior_command): Set exec_file_is_user_supplied and symfile_objfile_is_user_supplied. * main.c (captured_main): Likewise. * infcmd.c (attach_command_post_wait): Always call exec_file_locate_attach. Only call reopen_exec_file and reread_symbols if exec_file_is_user_supplied. * remote.c (remote_add_inferior): Remove get_exec_file check around exec_file_locate_attach. commit cb87cc5840129399855923ab381d6a11ba502593 Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Wed Aug 12 17:06:00 2015 +0200 openptarget ----------------------------------------------------------------------- Summary of changes: gdb/source.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) First 500 lines of diff: diff --git a/gdb/source.c b/gdb/source.c index 3c35075..99706a2 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1031,11 +1031,12 @@ openp_file (const char *path, enum openp_flags opts, const char *string, size_t if (!path) path = "."; - if ((opts & OPF_TRY_CWD_FIRST) || IS_ABSOLUTE_PATH (string)) + if ((opts & OPF_TRY_CWD_FIRST) || is_target_filename (string) + || IS_ABSOLUTE_PATH (string)) { int i; - if (is_regular_file (string)) + if (is_target_filename (string) || is_regular_file (string)) { filename = alloca (strlen (string) + 1); strcpy (filename, string); hooks/post-receive -- Repository for Project Archer.
next reply other threads:[~2015-08-12 15:39 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-12 15:39 jkratoch [this message] -- strict thread matches above, loose matches on Subject: below -- 2015-08-12 14:18 jkratoch 2015-08-11 21:01 jkratoch 2015-08-05 20:59 jkratoch
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=20150812153927.24271.qmail@sourceware.org \ --to=jkratoch@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).