This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: MinGW build failure for GDB 8.2.90 with source-highlight
On 2019-03-12 06:52, Pedro Alves wrote:
Pedro, did you have a branch where you put all of gdb in the gdb
namespace? I only found this branch, but it's using the gnulib::
namespace, which is not the same.
https://github.com/palves/gdb/commits/palves/cxx-gnulib-namespace
Right, not that one. That was the first attempt, and then I almost
posted
that one upstream at the time. I was about to press 'git send-email'
but
got cold feet, thinking there must be a better way. That's when
I tried the "namespace gdb" approach instead. And that one is in
the branch I pointed at in my previous message:
Prototyped here:
https://github.com/palves/gdb/commits/palves/cxx-gdb-namespace
Note: cxx-gdb-namespace != cxx-gnulib-namespace
Ah oops, sorry about that, it was late!
I just started to try to do it to get a feel of what's needed. I
guess we need to put pretty much everything except includes (and maybe
some other rare exceptions) between namespace gdb { ... }? And of
course define GNULIB_NAMESPACE to gdb.
Yes, that's the gist of it.
I've actually been working on that since Friday. Spent a chunk of the
weekend
on it, and some time yesterday. Meant to reply back yesterday, but
something
got in the way.
I have a script in the branch that does a good chunk of the work, but
unfortunately,
it still requires a lot of manual touching up. I thought the rebase
would be
trivial, but with all the new files and churn in the codebase since
2016, it
still involved a lot of manual re-work.
I can imagine.
I have it building on x86-64 now.
I've forced pushed what I have now. The branch has >130 patches
currently, most of
the them are small per-file patches. I need to clean this up a bit,
squash some
of the fixes-on-fixes patches. I'm not exactly sure how to post this
to the
list...
I don't really see how this can be done incrementally, it would be
really complicated to add the namespace to just some files, I think. So
I don't see any other choice than one big patch. Plus maybe some others
for preparation cleanups. Ideally the big patch would be trivial and
not move too much things around.
And also, of course this needs at least build-testing on a wider set
of hosts/cross compilers. Maybe people could take a preliminary look
at the
branch, see if they agree with direction?
I diffed the files that I modified manually when just trying it out
yesterday with the same files in your branch, and there is no
significant difference. I think the direction you took is fine.
Simon