Commit graph

116378 commits

Author SHA1 Message Date
Tom de Vries
743d3f0945 [gdb/testsuite] Add wait-for-index-cache in gdb.dwarf2/per-bfd-sharing.exp
If we make writing an index-cache entry very slow by doing this in
index_cache::store:
...
   try
     {
+      sleep (15);
       index_cache_debug ("writing index cache for objfile %s",
 			 bfd_get_filename (per_bfd->obfd));
...
we run into:
...
FAIL: gdb.dwarf2/per-bfd-sharing.exp: \
  couldn't remove files in temporary cache dir
...

The FAIL happens because there is no index-cache entry in the cache dir.

The problem is that gdb is killed (by gdb_exit) before the index-cache entry
is written.

Fix this by using "maint wait-for-index-cache".

Tested on x86_64-linux.

PR testsuite/30528
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30528
2023-10-26 10:34:24 +02:00
Thiago Jung Bauermann
35ce3b813f gdb/nat/aarch64-scalable-linux-ptrace.h: Don't include itself
GCC doesn't complain, but it's still wrong.
2023-10-25 21:27:09 -03:00
GDB Administrator
eefa1c2a64 Automatic date update in version.in 2023-10-26 00:00:29 +00:00
Guinevere Larsen
def86538a4 gdb/testsuite: add a clang XFAIL to gdb.python/py-watchpoint.exp
Clang doesn't use CFA information for variable locations. This makes it
so software breakpoints get a false hit when rbp gets popped, causing
a FAIL in gdb.python/py-watchpoint.exp. Since this is nothing wrong with
GDB itself, add an xfail to reduce noise.

Approved-By: Tom Tromey <tom@tromey.com>
2023-10-25 18:24:13 +02:00
Guinevere Larsen
f603d794f9 gdb/testsuite: fix running gdb.python/py-explore-cc with clang
The test gdb.python/py-explore-cc.exp was showing one unexpected
failure. This was due to how clang mapped instructions to lines,
resulting in the inferior seemingly stopping at a different location.

This patch adds a nop line in the relevant location so we don't need to
add XFAILs for existing clang releases, if this gets solved in future
versions.

Approved-By: Tom Tromey <tom@tromey.com>
2023-10-25 18:23:47 +02:00
Andrew Burgess
fe7c8e26fc gdbserver: don't leak program name in handle_v_run
I noticed that in handle_v_run (gdbserver/server.cc) we leak
new_program_name (a string) each time GDB starts an inferior, in the
case where GDB passes a program name to gdbserver.

This bug was introduced with this commit:

  commit 7ab2607f97
  Date:   Wed Apr 13 17:31:02 2022 -0400

      gdbsupport: make gdb_abspath return an std::string

When gdbserver receives a program name from GDB, this is first placed
into a malloc'd buffer within handle_v_run, and this buffer is then
used in this call:

  program_path.set (new_program_name);

Prior to the above commit this call took ownership of the buffer
passed to it, but now this call uses the buffer to initialise a
std::string, which copies the buffer contents, leaving ownership with
the caller.  So now, after this call (in handle_v_run)
new_program_name still owns a buffer.

At no point in handle_v_run do we free new_program_name, as a result
we are leaking the program name each time GDB starts a remote
inferior.

I could solve this by adding a 'free' call into handle_v_run, but I'd
rather automate the memory management.

So, to this end, I have added a new function in gdbserver/server.cc,
decode_v_run_arg.  This function takes care of allocating the memory
buffer and decoding the vRun packet into the buffer, but returns a
gdb::unique_xmalloc_ptr<char> (or nullptr on error).

Back in handle_v_run I have converted new_program_name to also be a
gdb::unique_xmalloc_ptr<char>.

Now, after we call program_path.set(), the allocated buffer will be
automatically released when it is no longer needed.

It is worth highlighting that within the new decode_v_run_arg
function, I have wrapped the call to hex2bin in a try/catch block.
The hex2bin function can throw an exception if it encounters an
invalid (non-hex) character.  Back in handle_v_run, we have a local
argument new_argv, which is of type std::vector<char *>.  Each
'char *' in this vector is a malloc'd buffer.  If we allow
hex2bin to throw an exception and don't catch it in either
decode_v_run_arg or handle_v_run then we are going to leak memory from
new_argv.

I chose to catch the exception in decode_v_run_arg, this seemed
cleanest, but I'm not sure it really matters, so long as the exception
is caught before we leave handle_v_run.  I am working on a patch that
changes new_argv to automatically manage its memory, but that isn't
ready for posting yet.  I think what I have here would be fine if my
follow on patch never arrives.

Additionally, within the handle_v_run loop I have changed an
assignment of nullptr to new_program_name into an assert.  Previously,
the assignment could only trigger on the first iteration of the loop,
if we had no new program name to assign.  However, new_program_name
always starts as nullptr, so, on the first loop iteration, if we have
nothing to assign to new_program_name, its value must already be
nullptr.

There should be no user visible changes after this commit.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
2023-10-25 16:51:19 +01:00
Simon Marchi
f9b96f673e gdb: make get_symbol_address a private method of symbol
get_symbol_address is only used symbol::value_address, make it a private
helper method.

Change-Id: I318ddcfcf1269d95045b8efe9137812df9c5113c
Approved-By: Tom Tromey <tom@tromey.com>
2023-10-25 11:34:59 -04:00
Simon Marchi
23e6f78151 gdb: make get_msymbol_address a private method of minimal_symbol
get_msymbol_address is only used in minimal_symbol::value_address.  Make
it a private helper method.

Change-Id: I3f30e1b9d89ace6682fb08a7ebb91746db0ccf0f
Approved-By: Tom Tromey <tom@tromey.com>
2023-10-25 11:34:59 -04:00
Vladimir Mezentsev
53beac2e23 gprofng: Fix -Wformat= warnings
Added format attribute to several gprofng functions.
Fixed -Wformat= warnings.

gprofng/ChangeLog
2023-10-23  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* libcollector/heaptrace.c: Fixed -Wformat= warnings.
	* libcollector/hwprofile.c: Likewise.
	* libcollector/iolib.c: Likewise.
	* libcollector/iotrace.c: Likewise.
	* libcollector/jprofile.c: Likewise.
	* libcollector/profile.c: Likewise.
	* libcollector/synctrace.c: Likewise.
	* src/ClassFile.cc: Likewise.
	* src/SourceFile.cc: Likewise.
	* libcollector/libcol_util.h: Added format attribute.
	* src/Emsg.h: Likewise.
	* src/collector_module.h: Likewise.
	* src/data_pckts.h: Define fld_sizeof.
2023-10-24 23:27:30 -07:00
Alan Modra
7ac6d0c38c asan: _bfd_elf_slurp_version_tables memory leak
Extends commit 6136093c0d to handle verdefs as well as verrefs.

	PR 30886
	* elf.c (_bfd_elf_slurp_version_tables): See free_contents for
	verdefs too.  Use free_contents rather than elf_tdata fields.
2023-10-25 11:12:11 +10:30
Alan Modra
220be06018 asan: out of memory in som_set_reloc_info
Sections without SEC_HAS_CONTENTS avoid the file size checks, and of
course it doesn't make sense to read such as the contents are all
zero.

	* som.c (som_set_reloc_info): Don't read sections without contents.
2023-10-25 11:12:11 +10:30
Alan Modra
e3afa68558 asan: NULL deref in alpha_ecoff_get_relocated_section_contents
This fixes some holes found by fuzzers, and removes aborts that can be
triggered by user input to objdump.  Abort should only be used within
bfd to show programming errors in bfd.

	* coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Handle
	NULL howto.  Don't abort on stack errors or on unexpected relocs.
	Show more bfd reloc status messages.
2023-10-25 11:12:11 +10:30
GDB Administrator
f959280488 Automatic date update in version.in 2023-10-25 00:00:25 +00:00
Tom de Vries
cda750802a [gdb/cli] Add gnu-source-highlight selftest
Add a selftest gnu-source-highlight:
...
$ gdb -q -batch -ex "maint selftest gnu-source-highlight"
Running selftest gnu-source-highlight.
Ran 1 unit tests, 0 failed
...

Tested on x86_64-linux.
2023-10-24 14:31:34 +02:00
Tom de Vries
07a9e70911 [readelf] Handle unknown name of main in .gdb_index section
When compiling hello world and adding a v9 .gdb-index section:
...
$ gcc -g hello.c
$ gdb-add-index a.out
...
readelf shows it as:
...
Shortcut table:
Language of main: unknown: 0
Name of main: ^A
...

The documentation of gdb says about the "Name of main" that:
...
This value must be ignored if the value for the language of main is zero.
...

Implement this approach in display_gdb_index, such that we have instead:
...
Shortcut table:
Language of main: unknown: 0
Name of main: <unknown>
...

Tested on x86_64-linux.

Approved-By: Jan Beulich <jbeulich@suse.com>
2023-10-24 12:35:08 +02:00
Lulu Cai
f87cf663af as: fixed internal error when immediate value of relocation overflow.
The as and ld use _bfd_error_handler to output error messages when
checking relocation alignment and relocation overflow. However, the
abfd value passed by as to the function is NULL, resulting in an
internal error. The ld passes a non-null value to the function,
so it can output an error message normally.
2023-10-24 15:27:39 +08:00
GDB Administrator
8bf3b48f72 Automatic date update in version.in 2023-10-24 00:00:35 +00:00
Tom de Vries
093c25c488 [gdb/python] Only include gdbsupport/selftest.h if GDB_SELF_TEST
I noticed that gdb/python/python.c unconditionally includes
gdbsupport/selftest.h.

Make this conditional on GDB_SELF_TEST.

Tested on x86_64-linux.
2023-10-23 18:25:12 +02:00
Jan Beulich
a0094f1a70 gas: make .nops output visible in listing
Due to using a different frag type (in turn due to storing data
differently), making the resulting code appear in listings requires
special handling.
2023-10-23 10:36:36 +02:00
Jan Beulich
c69011e953 x86: fold NOP testcase expectations where possible
Like done earlier for files needing adjustment anyway, also do this for
the remaining set.
2023-10-23 10:35:35 +02:00
Jan Beulich
ae7067fb21 x86: fold a few of the "alternative" NOP patterns
Since named objects may not overlap, the compiler is not permitted to do
this for us, to avoid wasting space and cache bandwidth/capacity.
2023-10-23 10:35:11 +02:00
Jan Beulich
ad9f323056 x86: add a few more NOP patterns
First of all add f32_5[], allowing to eliminate the extra slot-is-NULL
code from i386_output_nops(). Plus then introduce f32_8[] and f16_5[]
following the same concept of adding a %cs segment override prefix.

Also re-use patterns when possible and correct comments as applicable.
Similarly re-use testcase expectations as much as possible, where they
need touching anyway.
2023-10-23 10:34:11 +02:00
Jan Beulich
9f314ead9d x86: don't record full i386_cpu_flags in struct i386_tc_frag_data
We only use a single bit of this ever growing structure.
2023-10-23 10:33:25 +02:00
Jan Beulich
c8be4b6f1d x86: i686 != PentiumPro
The two are distinct in opcodes/, distinguished precisely by CpuNOP
that's relevant in i386_generate_nops(), yet the function has the PPro
case label in the other group. Simply removing it revealed that
cpu_arch[] had a wrong entry for i686.

While there also add PROCESSOR_IAMCU to the respective comment.
2023-10-23 10:33:02 +02:00
Jan Beulich
cd75cd859e x86: respect ".arch nonop" when selecting which NOPs to emit
Making GENERIC64 a special case was never correct; prior to the
generalization of ".arch .no*" to cover all ISA extensions other
processor families supporting long NOPs should have been covered as
well. When introducing ".arch .nonops" (among others) it wasn't
apparent that a hidden implication of .cpunop not being possible to
separately turn off existed here. Seeing that the two large case label
blocks in the 2nd switch() already had identical behavior, simply
collapse all of the (useful) case labels into a single "default" one.
2023-10-23 10:32:32 +02:00
Jan Beulich
5e0729b655 x86: don't use operand size override with NOP in 16-bit code
Since we don't key the NOP selection to user-controlled properties, we
may not use i386 features; otherwise we would violate a possible .arch
directive restricting ISA to pre-386.
2023-10-23 10:30:55 +02:00
Jan Beulich
d164359dbc x86: don't use 32-bit LEA as NOP surrogate in 64-bit code
Except for the shared 1- and 2-byte cases, the LEA uses corrupt %rsi
(by zero-extending %esi to %rsi). Introduce separate 64-bit patterns
which keep %rsi intact.
2023-10-23 10:30:30 +02:00
Jan Beulich
d12c7ab814 x86: i386_generate_nops() may not derive decisions from global variables
What matters is what was in effect at the time the original directive
was issued. Later changes to global state (bitness or ISA) must not
affect what code is generated.
2023-10-23 10:29:54 +02:00
Jan Beulich
ed71929492 x86: record flag_code in tc_frag_data
The recorded value, and not the global variable, will want using in
TC_FRAG_INIT(). The so far file scope variable therefore needs to become
external, to be accessible there.
2023-10-23 10:28:44 +02:00
Clément Chigot
be381d7175 objcopy: fix typo in --heap and --stack parser
The help says that <reserve> and <commit> should be separated by a ","
but the implementation is checking for ".". Having two numbers being
separated by a "." could be confusing, thus adjust the implementation to
match the help syntax.

binutils/ChangeLog:

	* objcopy.c (copy_main): Set separator to "," between <reserve>
	and <commit> for --heap and --stack.
	* doc/binutils.texi: Add <commit> for --heap and --stack.
2023-10-23 10:17:47 +02:00
GDB Administrator
4d47dfdba3 Automatic date update in version.in 2023-10-23 00:00:07 +00:00
Alan Modra
23cdc1d6da bfd-in2.h BFD_RELOC_* comments
I noticed the regenerated BFD_RELOC_MICROBLAZE_32_NONE comment didn't
match that committed to bfd-in2.h, and was just going to regen
bfd-in2.h but then decided to do something about the silly formatting
of these comments in bfd-in2.h.  eg. the BFD_RELOC_MICROBLAZE_32_NONE
comment:

-/* This is a 32 bit reloc that stores the 32 bit pc relative
-value in two words (with an imm instruction).No relocation is
-done here - only used for relaxing  */
+  /* This is a 32 bit reloc that stores the 32 bit pc relative value in
+     two words (with an imm instruction).  No relocation is done here -
+     only used for relaxing.  */
   BFD_RELOC_MICROBLAZE_32_NONE,

You'll notice how the second and third line of the original comment
aren't indented properly relative to the first line, and the whole
comment needs to be indented to match the code.

I've also edited reloc.c ENUMDOC paragraphs.  Some of these had excess
indentation, presumably in an attempt to properly indent bfd-in2.h
comments but that fails due to chew.c removing leading whitespace
early by skip_white_and_stars.  COMMENT was used in reloc.c to add
extra blank lines in bfd-in2.h.  I've removed them too as I don't
think they add anything to readability of that file.  (Perhaps more
usefully, they also add blank lines to libbfd.h separating relocs for
one target from others, but this isn't done consistently.)

	* doc/chew.c (drop, idrop): Move earlier.
	(strip_trailing_newlines): Check index before accessing array,
	not after.
	(wrap_comment): New function.
	(main): Add "wrap_comment" intrinsic.
	* doc/proto.str (ENUMDOC): Use wrap_comment.
	(make_enum_header, ENDSENUM): Put start and end braces on
	separate lines.
	* reloc.c: Remove uses of COMMENT and edit ENUMDOC paragraphs.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.
2023-10-23 10:02:53 +10:30
Tom Tromey
e2c04ee000 Style history variable output
When printing a value, I think the history reference -- the "$1" in
the output -- should be styled using the "variable" style.  This patch
implements this.
2023-10-22 09:03:42 -06:00
GDB Administrator
d249c8a63a Automatic date update in version.in 2023-10-22 00:00:08 +00:00
Simon Marchi
0e17d3fc08 gdb: fix owner passed to remove_target_sections in clear_solib
Commit 8971d2788e ("gdb: link so_list using intrusive_list") introduced
a bug in clear_solib.  Instead of passing an `so_list *` to
remove_target_sections, it passed an `so_list **`.  This was not caught
by the compiler, because remove_target_sections takes a `void *` as the
"owner", so you can pass it any pointer and it won't complain.

This happened because I previously had a patch to change the type of the
disposer parameter to be a reference rather than a pointer, so had to
change `so` to `&so`.  When dropping that patch, I forgot to revert this
bit and / or it got re-introduced when handling subsequent merge
conflicts.  And I didn't properly retest.

Fix that, but try to make things less error prone.  Add a union to
represent the possible owner kinds for a target_section.  Trying to pass
a pointer to another type than those will not compile.

Change-Id: I600cab5ea0408ccc5638467b760768161ca3036c
2023-10-20 22:00:23 -04:00
GDB Administrator
4a6daabb94 Automatic date update in version.in 2023-10-21 00:00:07 +00:00
Tom de Vries
eefa43c936 [gdb/cli] Allow source-highlight to autodetect language
Currently when gdb asks the source-highlight library to highlight a file, it
tells it what language file to use.

For instance, if gdb learns from the debug info that the file is language_c,
the language file "c.lang" is used.  This mapping is hardcoded in
get_language_name.

However, if gdb doesn't know what language file to use, it falls back to using
python pygments, and in absence of that, unhighlighted source text.

In the case of python pygments, it autodetects which language to use based on
the file name.

Add the same capability when using the source-highlight library.

Tested on x86_64-linux.

Verified that it works by:
- making get_language_name return nullptr for language_c, and
- checking that source-highlight still manages to highlight a hello world.

Reviewed-By: Guinevere Larsen <blarsen@redhat.com>
Approved-By: Tom Tromey <tom@tromey.com>

PR cli/30966
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30966
2023-10-20 22:23:13 +02:00
Tom Tromey
fb8ea9d2ca Don't include cooked-index.h from dwarf2/read.h
dwarf2/read.h includes cooked-index.h, but it doesn't need to.  This
patch removes the inclusion from this header, and adds one to
index-write.c to make up for the absence.
2023-10-20 13:03:34 -06:00
Neal Frager
1fa80e4c81 gas: testsuite: microblaze: cosmetic fix
This patch makes a cosmetic change to the reloc_weaksym.s
by making the bneid instruction all lower case like all of
the other instructions in the example.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Michael J. Eager <eager@eagercon.com>
2023-10-20 11:47:09 -07:00
Nick Alcock
cd4a8fc4f0 libctf: fix creation-time parent/child dict confusions
The fixes applied a few years ago to resolve confusions between parent and
child dicts at lookup time also apply in various forms to creation.  In
general, if you have a type in a parent dict ctf_imported into a child and
you do something to it, and the parent dict is writable (created via
ctf_create, not opened via ctf_open*) it should work just the same to make
changes to that type via a child dict as it does to make the change
to the parent dict directly -- and nothing you're prohibited from doing
to the parent dict when done directly should be allowed just because
you're doing it via a child.

Specifically, the following don't work when doing things from the child, but
should:

 - adding a member of a type in the parent to a struct or union in the
   parent via ctf_add_member or ctf_add_member_offset: this yields
   ECTF_BADID

 - adding a member of a type in the parent to a struct or union in the
   parent via ctf_add_member_encoded: this dumps core (!).

 - adding an enumerand to an enumerator in the parent: this yields
   ECTF_BADID

 - setting the properties of an array in the parent via ctf_set_array;
   this yields ECTF_BADID

Relatedly, some things work when doing things via a child that should fail,
yielding a CTF dictionary with invalid content (readable, but meaningless):
in particular, you can add a child type to a struct in the parent via
any of the ctf_add_member* family and nothing complains at all, even though
you should never be able to add references to children to parents (since any
given parent can be associated with many different children).

A family of tests is added to check each of these cases independently, since
some can result in coredumps and it would be nice to test the other cases
even if some dump core.  They use a common library to do all the actual
work.  The set of affected API calls was determined by code inspection
(auditing all calls to ctf_dtd_lookup): it's possible that I missed a few,
but I doubt it, since other cases use ctf_lookup* functions, which already
climb to the parent where appropriate.

libctf/ChangeLog:

	PR libctf/30985
	* ctf-create.c (ctf_dtd_lookup): Traverse to parents if necessary.
	(ctf_set_array): Likewise.  Report errors on the child; require
	both parent and child to be writable.
	(ctf_add_enumerator): Likewise.
	(ctf_add_member_offset): Likewise.  Prohibit addition of child types
	to structs in the parent.
	(ctf_add_member_encoded): Do not dereference a NULL dtd: report
	ECTF_BADID instead.
	* ctf-string.c (ctf_str_add_ref_internal): Report ENOMEM on the
	dict if addition of a string ref fails.
	* testsuite/libctf-writable/parent-child-dtd-crash-lib.c: New library.
	* testsuite/libctf-writable/parent-child-dtd-enum.*: New test.
	* testsuite/libctf-writable/parent-child-dtd-enumerator.*: New test.
	* testsuite/libctf-writable/parent-child-dtd-member-encoded.*: New test.
	* testsuite/libctf-writable/parent-child-dtd-member-offset.*: New test.
	* testsuite/libctf-writable/parent-child-dtd-set-array.*: New test.
	* testsuite/libctf-writable/parent-child-dtd-struct.*: New test.
	* testsuite/libctf-writable/parent-child-dtd-union.*: New test.
2023-10-20 18:09:54 +01:00
Neal Frager
d605374748 bfd: microblaze: Add 32_NONE reloc type
This patch adds the R_MICROBLAZE_32_NONE relocation type.
This is a 32-bit reloc that stores the 32-bit pc relative
value in two words (with an imm instruction).

Add test case to gas test suite.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Michael J. Eager <eager@eagercon.com>
2023-10-20 07:12:30 -07:00
Tom de Vries
938459015c [gdb/symtab] Fix more style issues in v9 .gdb_index section support
I noticed a few more style issues in commit 8b9c08edda ("[gdb/symtab] Add
name_of_main and language_of_main to the DWARF index"), after checking it
with gcc's check_GNU_style.{sh,py}.

Fix these.

Build on x86_64-linux.
2023-10-20 11:56:49 +02:00
Neal Frager
2d1777b530 opcodes: microblaze: Fix bit masking bug
There is currently a bug in the bit masking for the barrel shift
instructions because the bit mask is not including all of the
register bits which must be zero.  With this patch, the disassembler
can be sure that the 32-bit value is indeed a barrel shift instruction
and not a data value in memory.

This fix can be verified by assembling and disassembling the following:

	.text
	.long 0x65005f5f

With this patch, the bug is fixed, and the objdump will know that
0x65005f5f is not a barrel shift instruction.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Michael J. Eager <eager@eagercon.com>
2023-10-19 17:59:06 -07:00
GDB Administrator
4781e165dc Automatic date update in version.in 2023-10-20 00:00:11 +00:00
Tom Tromey
379435351c Fix race in DWARF reader
The recent change to record the DWARF language in the per-CU data
yielded a race warning in my testing:

ThreadSanitizer: data race ../../binutils-gdb/gdb/dwarf2/read.c:21779 in prepare_one_comp_unit

This patch fixes the bug by applying the same style of fix that was
done for the ordinary (gdb) language.

I wonder if this code could be improved.  Requiring an atomic for the
language in particular seems unfortunate, as it is often consulted
during index finalization.  However, I haven't investigated this.

Regression tested on x86-64 Fedora 38.

Reviewed-by: Tom de Vries <tdevries@suse.de>
2023-10-19 16:51:29 -06:00
Alan Modra
1b1b9bc05f PR30984, assertion fail elf.c:8485
PR 30984
	* ldelf.c (ldelf_place_orphan): Don't allow bfd_abs_section as
	a potential output section.
2023-10-20 08:57:34 +10:30
Simon Marchi
f005ccb4bc gdb: fix no-expat build of solib-target.c
Fixes:

      CXX    solib-target.o
    /home/smarchi/src/binutils-gdb/gdb/solib-target.c:57:8: error: ‘lm_info_vector’ does not name a type
       57 | static lm_info_vector
          |        ^~~~~~~~~~~~~~
    /home/smarchi/src/binutils-gdb/gdb/solib-target.c: In function ‘intrusive_list<shobj> solib_target_current_sos()’:
    /home/smarchi/src/binutils-gdb/gdb/solib-target.c:244:7: error: ‘solib_target_parse_libraries’ was not declared in this scope
      244 |     = solib_target_parse_libraries (library_document->data ());
          |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: Ib477d3343b401017d79729118242143bc95f24b2
2023-10-19 20:18:17 +00:00
Jose E. Marchesi
8fa1b632c1 ld: fix typo in ld.texi metdata->metadata 2023-10-19 21:53:57 +02:00
Simon Marchi
3fe0dfd160 gdb: rename struct so_list to shobj
Now that so_list lists are implemented using intrusive_list, it doesn't
really make sense for the element type to be named "_list".  Rename to
just `struct shobj` (`struct so` was deemed to be not greppable enough).

Change-Id: I1063061901298bb40fee73bf0cce44cd12154c0e
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-19 11:14:26 -04:00
Simon Marchi
30932f4012 gdb: remove free_so function
Remove this function, replace it with deleting the so_list in callers.

Change-Id: Idbd0cb84674ade1d8e17af471550dbd388264f60
Approved-By: Pedro Alves <pedro@palves.net>
Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
2023-10-19 10:57:51 -04:00