Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
The testcase in the PR had a variable with both DW_AT_decl_file and
DW_AT_specification, where the DW_AT_specification also specified
DW_AT_decl_file. This leads to a memory leak as the file name is
malloced and duplicates are not expected.
I've also changed find_abstract_instance to not use a temp for "name",
because that can result in a change in behaviour from the usual last
of duplicate attributes wins.
PR 29925
* dwarf2.c (find_abstract_instance): Delete "name" variable.
Free *filename_ptr before assigning new file name.
(scan_unit_for_symbols): Similarly free func->file and
var->file before assigning.
|
|
When I moved my last patch forward, somehow I missed removing
the #endif for the HAVE_LIBMPFR case.
Committed as obvious after a quick build.
gdb/ChangeLog:
* top.c: Remove the extra #endif which was missed.
|
|
This patch uses the toplevel configure parts for GMP/MPFR for
gdb. The only thing is that gdb now requires MPFR for building.
Before it was a recommended but not required library.
Also this allows building of GMP and MPFR with the toplevel
directory just like how it is done for GCC.
We now error out in the toplevel configure of the version
of GMP and MPFR that is wrong.
OK after GDB 13 branches? Build gdb 3 ways:
with GMP and MPFR in the toplevel (static library used at that point for both)
With only MPFR in the toplevel (GMP distro library used and MPFR built from source)
With neither GMP and MPFR in the toplevel (distro libraries used)
Changes from v1:
* Updated gdb/README and gdb/doc/gdb.texinfo.
* Regenerated using unmodified autoconf-2.69
Thanks,
Andrew Pinski
ChangeLog:
* Makefile.def: Add configure-gdb dependencies
on all-gmp and all-mpfr.
* configure.ac: Split out MPC checking from MPFR.
Require GMP and MPFR if the gdb directory exist.
* Makefile.in: Regenerate.
* configure: Regenerate.
gdb/ChangeLog:
PR bug/28500
* configure.ac: Remove AC_LIB_HAVE_LINKFLAGS
for gmp and mpfr.
Use GMPLIBS and GMPINC which is provided by the
toplevel configure.
* Makefile.in (LIBGMP, LIBMPFR): Remove.
(GMPLIBS, GMPINC): Add definition.
(INTERNAL_CFLAGS_BASE): Add GMPINC.
(CLIBS): Exchange LIBMPFR and LIBGMP
for GMPLIBS.
* target-float.c: Make the code conditional on
HAVE_LIBMPFR unconditional.
* top.c: Remove code checking HAVE_LIBMPFR.
* configure: Regenerate.
* config.in: Regenerate.
* README: Update GMP/MPFR section of the config
options.
* doc/gdb.texinfo: Likewise.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28500
|
|
When asking GDB to print a variable from an imported namespace, we only
want to see variables imported in lines that the inferior has already
gone through, as is being tested last in gdb.cp/nsusing.exp. However
with the proposed change to gdb.cp/nsusing.exp, we get the following
failures:
(gdb) PASS: gdb.cp/nsusing.exp: continue to breakpoint: marker10 stop
print x
$9 = 911
(gdb) FAIL: gdb.cp/nsusing.exp: print x, before using statement
next
15 y += x;
(gdb) PASS: gdb.cp/nsusing.exp: using namespace M
print x
$10 = 911
(gdb) PASS: gdb.cp/nsusing.exp: print x, only using M
Showing that the feature wasn't functioning properly, it just so
happened that gcc ordered the namespaces in a convenient way.
This happens because GDB doesn't take into account the line where the
"using namespace" directive is written. So long as it shows up in the
current scope, we assume it is valid.
To fix this, add a new member to struct using_direct, that stores the
line where the directive was written, and a new function that informs if
the using directive is valid already.
Unfortunately, due to a GCC bug, the failure still shows up. Compilers
that set the declaration line of the using directive correctly (such as
Clang) do not show such a bug, so the test includes an XFAIL for gcc
code.
Finally, because the final test of gdb.cp/nsusing.exp has turned into
multiple that all would need XFAILs for older GCCs (<= 4.3), and that
GCC is very old, if it is detected, the test just exits early.
Approved-by: Tom Tromey <tom@tromey.com>
|
|
|
|
parsing a corrupt ELF file.
PR 29924
* objdump.c (load_specific_debug_section): Check for excessively
large sections.
|
|
PR 29900
* scripttempl/pe.sc: Keep the .drectve section when performing a
relocateable link.
* scripttempl/pep.sc: Likewise.
|
|
While originally indeed used for register size checking only, the
attribute has been used for memory operand size checking as well already
for quite a while, with more such uses recently having been added.
|
|
The binaries involved in testing gprofng are native ones, and hence a
cross build of binutils won't really test intended functionality. Since
this testing takes quite a bit of time (typically more than running all
of binutils, gas, and ld testsuites together), restrict the testing to
native configurations only.
|
|
The warning about discarded sections in elf_link_input_bfd doesn't
belong there since the code is dealing with symbols. Multiple symbols
in a discarded section will result in multiple identical warnings
about the section. Move the warning to a new function in ldlang.c.
The patch also tidies the warning quoting of section and file names,
consistently using `%pA' and `%pB'. I'm no stickler for one style of
section and file name quoting, but they ought to be consistent within
a warning, eg. see the first one fixed in ldlang.c, and when a warning
is emitted for multiple targets they all ought to use exactly the same
format string to reduce translation work. elf64-ppc.c loses the
build_one_stub errors since we won't get there before hitting the
fatal errors in size_one_stub.
bfd/
* elflink.c (elf_link_input_bfd): Don't warn here about
discarded sections.
* elf32-arm.c (arm_build_one_stub): Use consistent style in
--enable-non-contiguous-regions error.
* elf32-csky.c (csky_build_one_stub): Likewise.
* elf32-hppa.c (hppa_build_one_stub): Likewise.
* elf32-m68hc11.c (m68hc11_elf_build_one_stub): Likewise.
* elf32-m68hc12.c (m68hc12_elf_build_one_stub): Likewise.
* elf32-metag.c (metag_build_one_stub): Likewise.
* elf32-nios2.c (nios2_build_one_stub): Likewise.
* elfnn-aarch64.c (aarch64_build_one_stub): Likewise.
* xcofflink.c (xcoff_build_one_stub): Likewise.
* elf64-ppc.c (ppc_size_one_stub): Likewise.
(ppc_build_one_stub): Delete dead code.
ld/
* ldlang.c (lang_add_section): Use consistent style in
--enable-non-contiguous-regions warnings.
(size_input_section): Likewise.
(warn_non_contiguous_discards): New function.
(lang_process): Call it.
* testsuite/ld-arm/non-contiguous-arm.d: Update.
* testsuite/ld-arm/non-contiguous-arm4.d: Update.
* testsuite/ld-arm/non-contiguous-arm7.d: Add
--enable-non-contiguous-regions-warnings.
* testsuite/ld-arm/non-contiguous-arm7.err: New.
* testsuite/ld-powerpc/non-contiguous-powerpc.d: Update.
* testsuite/ld-powerpc/non-contiguous-powerpc64.d: Update.
|
|
PR 29922
* dwarf2.c (find_debug_info): Ignore sections without
SEC_HAS_CONTENTS.
|
|
Now that all ports have migrated to the new framework, drop support
for the old sim_cpu_base layout. There's a lot of noise here, so
it's been split into a dedicated commit.
|
|
All ports should be migrated now. Drop the SIM_HAVE_COMMON_SIM_CPU
knob and require it be used everywhere now.
|
|
The cpu.h change is in generated cgen code, but that has been sent
upstream too, so the next regen should include it automatically.
|
|
The cpu*.h changes are in generated cgen code, but that has been sent
upstream too, so the next regen should include it automatically.
|
|
The cpu.h change is in generated cgen code, but that has been sent
upstream too, so the next regen should include it automatically.
|
|
The cpu.h change is in generated cgen code, but that has been sent
upstream too, so the next regen should include it automatically.
|
|
The cpu.h change is in generated cgen code, but that has been sent
upstream too, so the next regen should include it automatically.
|
|
The cpu*.h changes are in generated cgen code, but that has been sent
upstream too, so the next regen should include it automatically.
|
|
The cpu.h change is in generated cgen code, but that has been sent
upstream too, so the next regen should include it automatically.
|
|
Some common cgen code changes to allow cgen ports to invert their
sim_cpu storage one-by-one.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Currently all ports have to declare sim_cpu themselves in their
sim-main.h and then embed the common sim_cpu_base in it. This
dynamic makes it impossible to share common object code among
multiple ports because the core data structure is always different.
Let's invert this relationship: common code declares sim_cpu, and
the port uses the new arch_data field for its per-cpu state.
This is the first in a series of changes: it adds a define to select
between the old & new layouts, then converts all the ports that don't
need custom state over to the new layout. This includes mn10300 that,
while it defines custom fields in its cpu struct, never uses them.
|
|
These headers define the register numbers for each port to implement
the sim_fetch_register & sim_store_register interfaces. While gdb
uses these, the APIs are part of the sim, not gdb. Move the headers
out of the gdb/ include namespace and into sim/ instead.
|
|
The spreg.[ch] files live in the source tree now and are created
with the dgen.py script, so we don't need this old tool anymore.
|
|
Simplify the build by moving the generation of these files from
build-time (via dgen.c that we have to compile & execute on the
build system) to maintainer/release mode (via spreg-gen.py that
we only ever execute when the spreg table actually changes). It
speeds up the build process and makes it easier for us to reason
about & review changes to the code generator.
The tool is renamed from "dgen" because it's hardcoded to only
generated spreg files. It isn't a generalized tool for creating
lookup tables.
|
|
|
|
The libtool patch broke install-strip of gdb:
/bin/sh ../../gdb/../mkinstalldirs /src/gdb/inst/share/gdb/python/gdb
transformed_name=`t='s,y,y,'; \
echo gdb | sed -e "$t"` ; \
if test "x$transformed_name" = x; then \
transformed_name=gdb ; \
else \
true ; \
fi ; \
/bin/sh ../../gdb/../mkinstalldirs /src/gdb/inst/bin ; \
/bin/sh ./libtool --mode=install STRIPPROG='strip' /bin/sh /src/gdb/gdb.git/install-sh -c -s \
gdb \
/src/gdb/inst/bin/$transformed_name ; \
/bin/sh ../../gdb/../mkinstalldirs /src/gdb/inst/include/gdb ; \
/usr/bin/install -c -m 644 jit-reader.h /src/gdb/inst/include/gdb/jit-reader.h
libtool: install: `/src/gdb/inst/bin/gdb' is not a directory
libtool: install: Try `libtool --help --mode=install' for more information.
Since INSTALL_PROGRAM_ENV is no longer at the beginning of the command, the
gdb executable is not installed with install-strip.
|
|
The discard of symbols should be performed whether the warning for
the discard is enabled or not.
Without this patch, ld would segfault in bfd_section_removed_from_list,
called in the if-statement right after this block, as the argument
isec->output_section can be NULL.
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Co-Authored-By: Yvan ROUX <yvan.roux@foss.st.com>
|
|
PR 29915
* configure.ac: Add AC_CHECK_DECLS test ___lc_codepage_func.
* configure: Regenerate.
* config.in: Regenerate.
* bfdio.c (___lc_codepage_func): Move declaration to..
(_bfd_real_fopen): ..here, and use !HAVE_DECL____LC_CODEPAGE_FUNC.
|
|
Regen opcodes/po/POTFILES.in
|
|
Simplify the generator by always outputting the switch tables, and
leave the choice of whether to use them to the compiler via a -D
flag.
|
|
The core device has an attach address method as the root of the tree
which calls out to the sim API. But it doesn't have a corresponding
detach method which means we just crash if anything tries to detach
itself from the core. In practice, the m68hc11 is the only model
that actually tries to detach itself on the fly, so no one noticed
earlier.
With this in place, we can delete the existing detach code from the
m68hc11 model since it defaults to "passthru" callback which will in
turn call the dv-core detach, and they have the same behavior -- call
the sim core API to detach from the address space.
Bug: https://sourceware.org/PR25211
|
|
gprofng/ChangeLog
2022-12-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/29646
* common/core_pcbe.c: Fix missingReturn warning.
* libcollector/iolib.c: Fix -Waddress warnings.
* src/Settings.cc: Likewise.
* src/checks.cc: Likewise.
* libcollector/linetrace.c: Likewise.
* libcollector/iotrace.c: Fix va_end_missing error.
* libcollector/libcol_util.c: Fix uninitvar warning.
* src/Command.cc: Fix arrayIndexOutOfBounds error.
* src/Function.cc: Fix uninitStructMember warning.
* src/ipc.cc: Fix -Wwrite-strings warnings.
|
|
|