This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 8/9] Make the default sysroot be "target:"
- From: Pedro Alves <palves at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>, gdb-patches at sourceware dot org
- Date: Wed, 01 Apr 2015 13:15:13 +0100
- Subject: Re: [PATCH 8/9] Make the default sysroot be "target:"
- Authentication-results: sourceware.org; auth=none
- References: <1426870087-32654-1-git-send-email-gbenson at redhat dot com> <1426870087-32654-9-git-send-email-gbenson at redhat dot com>
On 03/20/2015 04:48 PM, Gary Benson wrote:
> This commit makes GDB default to a sysroot of "target:".
> One testcase needed updating as a result of this change.
That's because when the sysroot is "target:" and the filesystem
is remote, the sysroot is stripped from the "Inferior loaded"
message, right? A short comment in the test would help.
OK with that change.
Thanks,
Pedro Alves
>
> gdb/ChangeLog:
>
> * main.c (captured_main): Set gdb_sysroot to "target:"
> if not otherwise set.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.base/break-probes.exp: Cope with "target:" sysroot.
> ---
> gdb/ChangeLog | 5 +++++
> gdb/main.c | 6 ++++++
> gdb/testsuite/ChangeLog | 4 ++++
> gdb/testsuite/gdb.base/break-probes.exp | 2 +-
> 4 files changed, 16 insertions(+), 1 deletions(-)
>
> diff --git a/gdb/main.c b/gdb/main.c
> index 72b8714..8f276b4 100644
> --- a/gdb/main.c
> +++ b/gdb/main.c
> @@ -548,6 +548,12 @@ captured_main (void *data)
> gdb_sysroot = relocate_gdb_directory (TARGET_SYSTEM_ROOT,
> TARGET_SYSTEM_ROOT_RELOCATABLE);
>
> + if (gdb_sysroot == NULL || *gdb_sysroot == '\0')
> + {
> + xfree (gdb_sysroot);
> + gdb_sysroot = xstrdup (TARGET_SYSROOT_PREFIX);
> + }
> +
> debug_file_directory = relocate_gdb_directory (DEBUGDIR,
> DEBUGDIR_RELOCATABLE);
>
> diff --git a/gdb/testsuite/gdb.base/break-probes.exp b/gdb/testsuite/gdb.base/break-probes.exp
> index 1591c33..d4d756f 100644
> --- a/gdb/testsuite/gdb.base/break-probes.exp
> +++ b/gdb/testsuite/gdb.base/break-probes.exp
> @@ -72,7 +72,7 @@ if { $using_probes } {
> while { $not_loaded_library } {
> set not_loaded_library 0
> gdb_test_multiple "c" $test {
> - -re "Inferior loaded $sysroot$binfile_lib\\M.*$gdb_prompt $" {
> + -re "Inferior loaded ($sysroot)?$binfile_lib\\M.*$gdb_prompt $" {
> pass $test
> }
> -re "Stopped due to shared library event\\M.*$gdb_prompt $" {