This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix build breakage on GNU/Linux AArch64 and use std::vector on tdesc.reg_defs
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, Yao Qi <yao dot qi at linaro dot org>
- Date: Sun, 10 Sep 2017 11:02:35 +0200
- Subject: Re: [PATCH] Fix build breakage on GNU/Linux AArch64 and use std::vector on tdesc.reg_defs
- Authentication-results: sourceware.org; auth=none
- References: <20170910055056.21186-1-sergiodj@redhat.com>
On 2017-09-10 07:50, Sergio Durigan Junior wrote:
This patch fixes the build breakage that has been happening on AArch64
since September 5th. The breakage was introduced by the following
commit:
author Yao Qi <yao.qi@linaro.org>
Tue, 5 Sep 2017 04:54:52 -0400 (09:54 +0100)
committer Yao Qi <yao.qi@linaro.org>
Tue, 5 Sep 2017 04:54:52 -0400 (09:54 +0100)
commit f7000548a2b79d7e5cb924468117ca4245e6b820
Use VEC for target_desc.reg_defs
The build log for this commit can be seen here:
<https://gdb-build.sergiodj.net/builders/Ubuntu-AArch64-native-gdbserver-m64/builds/2696/steps/compile%20gdb/logs/stdio>
And the underlying problem is that the code is not calling the new
function "allocate_target_description" to allocate the "struct
target_desc" using "new" instead of XNEW, which end up not properly
initializing the fields of the structure.
I took the opportunity to convert the code to std::vector (instead of
VEC), which makes things even simpler. This has been regtested on the
BuildBot, without regressions, and fixes the build breakage.
Hi Sergio,
This patch seems to do two independent changes:
- use allocate_target_description instead of XNEW
- replace VEC with std::vector
Can you post separate patches? You can push the first one directly, I
would call it obvious (and it's the important bits to fix the build).
The second one, Yao might want to take a look.
Thanks!
Simon