mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
23767560e5
The error below shows that aarch32-tdep.c is missing an include for aarch32-tdep.h, add it. CXX aarch32-tdep.o /home/smarchi/src/binutils-gdb/gdb/aarch32-tdep.c: In function ‘const target_desc* aarch32_read_description()’: /home/smarchi/src/binutils-gdb/gdb/aarch32-tdep.c:27:1: error: no previous declaration for ‘const target_desc* aarch32_read_description()’ [-Werror=missing-declarations] aarch32_read_description () ^~~~~~~~~~~~~~~~~~~~~~~~ Putting the include of aarch32-tdep.h early in aarch32-tdep.c gives us an error about target_desc not being defined. Indeed, aarch32-tdep.h uses target_desc without forward-declaring it or including the proper header. Add a forward-declaration for it. gdb/ChangeLog: * aarch32-tdep.c: Include aarch32-tdep.h. * aarch32-tdep.h: Forward-declare struct target_desc. Change-Id: Ica4be4de0fbd7f22d56a29a40fbf0a31b5abdb16
37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
/* Copyright (C) 2019 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#include "gdbsupport/common-defs.h"
|
|
|
|
#include "aarch32-tdep.h"
|
|
|
|
#include "gdbsupport/common-regcache.h"
|
|
#include "arch/aarch32.h"
|
|
|
|
static struct target_desc *tdesc_aarch32;
|
|
|
|
/* See aarch32-tdep.h. */
|
|
|
|
const target_desc *
|
|
aarch32_read_description ()
|
|
{
|
|
if (tdesc_aarch32 == nullptr)
|
|
tdesc_aarch32 = aarch32_create_target_description ();
|
|
|
|
return tdesc_aarch32;
|
|
}
|