~ubuntu-support-team/binutils/+git/binutils-gdb:users/simark/arm-none-core-file

Last commit made on 2020-10-22
Get this branch:
git clone -b users/simark/arm-none-core-file https://git.launchpad.net/~ubuntu-support-team/binutils/+git/binutils-gdb

Branch merges

Branch information

Name:
users/simark/arm-none-core-file
Repository:
lp:~ubuntu-support-team/binutils/+git/binutils-gdb

Recent commits

3bc3569... by Fredrik Hederstierna

Support for corefiles for arm-none-eabi target.

Change-Id: I8f4c57e653ae4e0400475ea55069f0dde280babb

c53dcd7... by GDB Administrator <email address hidden>

Automatic date update in version.in

a46d184... by Simon Marchi <email address hidden>

gdb: fix two comments in infrun

These comments are stale, they refer to non-existent parameters. Fix
that.

gdb/ChangeLog:

 * infrun.c (displaced_step_in_progress_thread): Fix comment.
 (displaced_step_in_progress): Fix comment.

Change-Id: I7a39f1338fbfbf73153b49cbca0345d495d12762

0d01fbe... by Tom Tromey <email address hidden>

Remove libctf/mkerrors.sed

This patch removes libctf/mkerrors.sed, replacing it with a macro in
ctf-api.h. This simplifies the build and avoids possible unportable
code in the sed script.

2020-10-21 Tom Tromey <email address hidden>

 * ctf-api.h (_CTF_ERRORS): New macro.

libctf/ChangeLog
2020-10-21 Tom Tromey <email address hidden>

 * mkerrors.sed: Remove.
 * ctf-error.c (_CTF_FIRST): New define.
 (_CTF_ITEM): Define this, not _CTF_STR.
 (_ctf_errlist, _ctf_erridx): Use _CTF_ERRORS.
 (ERRSTRFIELD): Rewrite.
 (ERRSTRFIELD1): Remove.
 * Makefile.in: Rebuild.
 * Makefile.am (BUILT_SOURCES): Remove.
 (ctf-error.h): Remove.

ffd73a8... by Przemyslaw Wirkus

aarch64: Add testcase for HCR_EL2 system register

HCR_EL2 is a 64-bit Hypervisor Configuration Register.

gas/ChangeLog:

2020-10-16 Przemyslaw Wirkus <email address hidden>

 * testsuite/gas/aarch64/sysreg-6.d: New test.
 * testsuite/gas/aarch64/sysreg-6.s: New test.

5962451... by Nick Clifton <email address hidden>

Work around problem in DWARF decoding library which can result in attempts to read arbitrary bytes as if they were an LEB128 encoded value.

 * dwarf.c (skip_attr_bytes): Accept DWARF versions higher than 4
 when processing the DW_FORM_ref_addr form.
 Skip bytes in DW_FORM_block and DW_FORM_exprloc forms.
 Handle DW_FORM_indirect.
 (get_type_signedness): Allow a limited amount of recursion.
 Do not attempt to decode types that use the DW_FORM_ref_addr form.
 (read_and_display_attr_value): Do not attempt to decode types
 that use the DW_FORM_ref_addr form.

c21f37a... by Simon Marchi

gdb: make gdbarch_make_corefile_notes return a unique ptr

This patch starts by making the gdbarch_make_corefile_notes function
return a gdb::unique_xmalloc_ptr<char> and takes care of the fallouts,
mostly in linux-tdep.c and fbsd-tdep.c.

The difficulty in these files is that they use the BFD API for writing
core files, where you pass in a pointer to a malloc-ed buffer (or NULL
in the beginning), it re-allocs it if needed, and returns you the
possibly updated pointer. I therefore used this pattern everywhere:

  note_data.reset (elfcore_write_note (obfd, note_data.release (), ...)

This hands over the ownership of note_data to the BFD function for the
duration of the call, and then puts its back in note_data right after
the call.

gdb/ChangeLog:

 * gdbarch.sh (make_corefile_notes): Return unique pointer.
 * gdbarch.c: Re-generate.
 * gdbarch.h: Re-generate.
 * gcore.c (write_gcore_file_1): Adjust.
 * fbsd-tdep.c (struct fbsd_collect_regset_section_cb_data): Add
 constructor.
 <note_data>: Change type to unique pointer.
 <abort_iteration>: Change type to bool.
 (fbsd_collect_regset_section_cb): Adjust to unique pointer.
 (fbsd_collect_thread_registers): Return void, adjust.
 (struct fbsd_corefile_thread_data): Add construtor.
 <note_data>: Change type to unique pointer.
 (fbsd_corefile_thread): Adjust.
 (fbsd_make_corefile_notes): Return unique pointer, adjust.
 * linux-tdep.c (linux_make_mappings_corefile_notes): Change type
 to unique pointer, adjust.
 (struct linux_collect_regset_section_cb_data): Add constructor.
 <note_data>: Change type to unique pointer.
 <abort_iteration>: Change type to bool.
 (linux_collect_thread_registers): Return void, adjust.
 (struct linux_corefile_thread_data): Add constructor.
 <note_data>: Change type to unique pointer.
 (linux_corefile_thread): Adjust.
 (linux_make_corefile_notes): Return unique pointer, adjust.

Change-Id: I1e03476bb47b87c6acb3e12204d193f38cc4e02b

4dbe16c... by Simon Marchi

gdbserver: fix overlap in sprintf argument and buffer

While trying to build on Cygwin (gcc 10.2.0), I got:

      CXX server.o
    /home/Baube/src/binutils-gdb/gdbserver/server.cc: In function 'void handle_general_set(char*)':
    /home/Baube/src/binutils-gdb/gdbserver/server.cc:832:12: error: 'sprintf' argument 3 overlaps destination object 'own_buf' [-Werror=restrict]
      832 | sprintf (own_buf, "E.Unknown thread-events mode requested: %s\n",
          | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      833 | mode);
          | ~~~~~
    /home/Baube/src/binutils-gdb/gdbserver/server.cc:553:27: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
      553 | handle_general_set (char *own_buf)
          | ~~~~~~^~~~~~~

There is indeed a problem: mode points somewhere into own_buf. And by
the time mode gets formatted as a %s, whatever it points to has been
overwritten. I hacked gdbserver to coerce it into that error path, and
this is the resulting message:

    (gdb) p own_buf
    $1 = 0x629000000200 "E.Unknown thread-events mode requested: ad-events mode requested: 00;10:9020fdf7ff7f0000;thread:p49388.49388;core:e;\n"

Fix it by formatting the error string in an std::string first.

gdbserver/ChangeLog:

 * server.cc (handle_general_set): Don't use sprintf with
 argument overlapping buffer.

Change-Id: I4fdf05c0117f63739413dd67ddae7bd6ee414824

98cec4f... by Gary Benson <email address hidden>

Fix gdb.mi/mi-fullname-deleted.exp with Clang

gdb.mi/mi-fullname-deleted.exp attempts to generate an executable
with a doubled slash in the source filename recorded in its debug
info. This attempt fails when compiling using Clang, causing the
substituted filename test to fail. This commit fixes this issue.
It also expands the comments in the file, to clarify what the test
is attempting to do, and to document where it doesn't succeed.

gdb/testsuite/ChangeLog:

 * gdb.mi/mi-fullname-deleted.exp: Fix substituted
 fullname test with Clang. Also expand comments generally.

a1bd891... by GDB Administrator <email address hidden>

Automatic date update in version.in