This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb: sim: automatically pass down sysroot


On Thu, Jun 9, 2011 at 10:24, Joel Brobecker wrote:
>> > 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.

i was working with constants originally, but when i looked at Joel's
patch, i copied & pasted what he did.  so the erc32 version i
committed includes his latest change.
-mike

--- interf.c    1 Jun 2011 17:35:02 -0000       1.10
+++ interf.c    9 Jun 2011 15:30:54 -0000
@@ -234,6 +234,9 @@ sim_open (kind, callback, abfd, argv)
                if ((stat + 1) < argc) {
                    freq = strtol(argv[++stat], (char **)NULL, 0);
                }
+           } else
+           if (strncmp(argv[stat], "--sysroot=", sizeof("--sysroot=")
- 1) == 0) {
+               /* Ignore until we start to support this.  */
            } else {
                (*sim_callback->printf_filtered) (sim_callback,
                                                  "unknown option %s\n",


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]