From: Joel Brobecker <brobecker@adacore.com>
To: Tristan Gingold <gingold@adacore.com>
Cc: Mike Frysinger <vapier@gentoo.org>,
gdb-patches@sourceware.org, toolchain-devel@blackfin.uclinux.org
Subject: Re: [PATCH] gdb: sim: automatically pass down sysroot
Date: Thu, 09 Jun 2011 14:24:00 -0000 [thread overview]
Message-ID: <20110609142421.GF12834@adacore.com> (raw)
In-Reply-To: <8BCAE08E-3F58-49B3-B822-E3BC2B298C7F@adacore.com>
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
> > here's the fix for erc32. ok to commit ?
>
> Is it correct ? IIRC sizeof ("xxx") == strlen ("xxx") + 1.
You're quite right. The weird thing is that I had the "- 1"
in my code at some point, I'm sure of that. How it came to
disappear, I'm really puzzled.
Here is what I just checked in to fix the problem on ppc.
Thanks, Tristan.
--
Joel
[-- Attachment #2: sim-ppc.diff --]
[-- Type: text/x-diff, Size: 1435 bytes --]
commit 1f192d6b369336703e07d74833f98a8bdc6c3361
Author: Joel Brobecker <brobecker@adacore.com>
Date: Thu Jun 9 07:18:36 2011 -0700
sim/ppc: Fix check for --sysroot= option
Fixes an error reported by Tristan and which can be evidenced by
doing:
% powerpc-elf-gdb
(gdb) target sim --sysroot=var
Invalid option: --sysroot=/var
[...]
sim/ppc/ChangeLog:
* psim.c (psim_options): Fix length of comparison when checking
for --sysroot= option.
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 5e6fff6..455585a 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-09 Joel Brobecker <brobecker@adacore.com>
+
+ * psim.c (psim_options): Fix length of comparison when checking
+ for --sysroot= option.
+
2011-06-08 Joel Brobecker <brobecker@adacore.com>
* psim.c (psim_options): Add option that cause the error
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index d814486..3e76386 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -359,7 +359,7 @@ psim_options(device *root,
else if (strcmp (argv[argp], "--help") == 0)
psim_usage (0, 1);
else if (strncmp (argv[argp], "--sysroot=",
- sizeof ("--sysroot=")) == 0)
+ sizeof ("--sysroot=") - 1) == 0)
/* Ignore this option. */
p = argv[argp] + strlen(argv[argp]) - 1;
else if (strcmp (argv[argp], "--version") == 0)
next prev parent reply other threads:[~2011-06-09 14:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 20:03 Mike Frysinger
2011-05-26 20:10 ` Marek Polacek
2011-05-26 22:32 ` Mike Frysinger
2011-05-27 17:48 ` Tom Tromey
2011-05-27 17:54 ` Pedro Alves
2011-06-08 16:50 ` Joel Brobecker
2011-06-08 17:08 ` Mike Frysinger
2011-06-08 17:15 ` Joel Brobecker
2011-06-09 5:19 ` Mike Frysinger
2011-06-09 5:19 ` Mike Frysinger
2011-06-09 5:48 ` Joel Brobecker
2011-06-09 6:07 ` Mike Frysinger
2011-06-09 14:26 ` Joel Brobecker
2011-06-09 7:29 ` Tristan Gingold
2011-06-09 14:24 ` Joel Brobecker [this message]
2011-06-09 15:32 ` Mike Frysinger
[not found] <1306440200-25087-1-git-send-email-vapier__8251.52545371584$1306440225$gmane$org@gentoo.org>
2011-05-27 17:47 ` Tom Tromey
2011-05-27 18:37 ` Mike Frysinger
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=20110609142421.GF12834@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=gingold@adacore.com \
--cc=toolchain-devel@blackfin.uclinux.org \
--cc=vapier@gentoo.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: 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