[review v2] [ARM, Thumb] Fix disassembling bug after reloading a symbol file

Luis Machado (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Wed Oct 30 15:22:00 GMT 2019


Luis Machado has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/447
......................................................................


Patch Set 2:

(2 comments)

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/447/2//COMMIT_MSG 
Commit Message:

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/447/2//COMMIT_MSG@62 
PS2, Line 62: 
53 | 	(arm_bfd_data_key): ... this.
54 | 	(arm_find_mapping_symbol): Adjust access to new bfd_key-based
55 | 	data.
56 | 	(arm_record_special_symbol): Likewise.
57 | 
58 | gdb/testsuite/ChangeLog:
59 | 
60 | 2019-01-29  Luis Machado  <luis.machado@linaro.org>
61 | 
62 | 	* gdb.arch/pr25124.S: New file.

> If there's a PR open for this, then each ChangeLog should […]

Great. I'll add it. Thanks for the catching that.


https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/447/2/gdb/arm-tdep.c 
File gdb/arm-tdep.c:

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/447/2/gdb/arm-tdep.c@117 
PS2, Line 117: 
108 |      symbol value (address).  */
109 |   std::unique_ptr<arm_mapping_symbol_vec[]> section_maps;
110 | 
111 |   /* For each corresponding element of section_maps above, is this vector
112 |      sorted.  */
113 |   std::unique_ptr<bool[]> section_maps_sorted;
114 | };
115 | 
116 | /* Per-bfd data used for mapping symbols.  */
117 | static bfd_key<arm_per_bfd> arm_bfd_data_key;

> I wonder if `arm_exidx_data_key` needs this treatment as well?

I did go through it when doing the change. It seems a bit more complicated, and it is attached to an observer, but i think it makes sense to convert it too.

I'll make a separate patch for it, since, unlike this particular case, the exidx processing doesn't suffer from not getting updated when we reload the objfile.



-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I22c3e6ebe9bfedad66d56fe9656994fa1761c485
Gerrit-Change-Number: 447
Gerrit-PatchSet: 2
Gerrit-Owner: Luis Machado <luis.machado@linaro.org>
Gerrit-Reviewer: Luis Machado <luis.machado@linaro.org>
Gerrit-CC: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-CC: Tom Tromey <tromey@sourceware.org>
Gerrit-Comment-Date: Wed, 30 Oct 2019 15:22:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: comment



More information about the Gdb-patches mailing list