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: Propose we release GDB 9.1 next weekend (Feb 01-02)


 Am Dienstag, 28. Januar 2020, 18:13:15 MEZ hat Simon Marchi <simark@simark.ca> Folgendes geschrieben:

> On 2020-01-28 11:53 a.m., Hannes Domani via gdb-patches wrote:
> > I just noticed that gdbserver is a bit broken for x86_64-mingw (and I think
> > it always was).>
> > Reason for it is this part in gdbserver/server.c:
> >
> >     document += string_printf
> >       ("  <library name=\"%s\"><segment address=\"0x%lx\"/></library>\n",
> >        dll.name.c_str (), (long) dll.base_addr);
> >
> > (long) is always 32bit on Windows, so the upper bits are cut off.
>
> Indeed.  That code went through several refactors, but originally it was introduced
> by this 2007 commit:
>
>   https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=255e7678a93693bd4d16cc3246442a1b8e11064e
>
> which has this line:
>
>   sprintf (p, "0x%lx", (long) dll->base_addr);
>
> So I think the bug has been there forever.
>
>
> > Fix seems simple:
> >
> >      document += string_printf
> > -      ("  <library name=\"%s\"><segment address=\"0x%lx\"/></library>\n",
> > -       dll.name.c_str (), (long) dll.base_addr);
> > +      ("  <library name=\"%s\"><segment address=\"0x%s\"/></library>\n",
> > +       dll.name.c_str (), paddress (dll.base_addr));
> >
> > I just tested it and this improves the debugging experience a lot.
> >
> > But I guess this is probably too late for the release.
>
>
> I don't think it so, we can always push fixes to the release branch.  This one
> seems desirable and not risky at all, so I think it would be fine.  Would you
> be willing to submit a complete patch for this?

Yes, I will do that.


Regards
Hannes Domani


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