[PATCH] gdb: fix xtensa build with custom overlay
Pedro Alves
palves@redhat.com
Fri Apr 17 16:21:00 GMT 2015
On 04/17/2015 05:11 PM, Max Filippov wrote:
> The commit 14e361d7aa3bbd8601b0457ee8558344e444c651 ("xtensa-config.c:
> missing defs.h include") fixed the build of default xtensa configuration
> by including defs.h in the beginning of xtensa-config.c. Unfortunately
> this fix doesn't work when gdb is configured for another xtensa core, as
> the file xtensa-config.c is a part of configuration overlay and it gets
> overwritten. To fix the build for all existing configurations include
> defs.h into gdb/xtensa-tdep.h, where the issue (reference to undeclared
> uint32_t) actually is.
Hmm, I think that's news to me. Can you please expand a bit
on why is this mechanism necessary?
In any case, that mechanism must already by outputting:
#include "xtensa-config.h"
#include "xtensa-tdep.h"
Just make it output #include "defs.h" as well?
That .c files must include defs.h is part of the standards:
https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards
"
(...)
All other .c files under gdb/ must include defs.h as their first non-comment line.
(...)
No .h file should include defs.h, server.h or common-defs.h.
(...)
"
>
> 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
> gdb/
> * xtensa-tdep.h: Include defs.h
Note missing period.
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list