gdb/solib-frv: move lm_info object to solib

Message ID 20240722144254.52739-1-simon.marchi@efficios.com
State New
Headers
Series gdb/solib-frv: move lm_info object to solib |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed

Commit Message

Simon Marchi July 22, 2024, 2:42 p.m. UTC
  I noticed that the lm_info_frv objects created in frv_current_sos are
never moved to the solib object.  This bug was introduced in 8971d2788e
("gdb: link so_list using intrusive_list"), which mistakenly removed the
line

    sop->lm_info = std::move (li);

... probably due so a bad merge conflict resolution.

Re-add this line.

If merged in master, I would cherry-pick this to gdb-15-branch.

Change-Id: I609a1a5ad39e93f70a95ea5ebe3f8ff4ab6a8db2
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32005
---
 gdb/solib-frv.c | 2 ++
 1 file changed, 2 insertions(+)


base-commit: 6fc24c7607ba54a2fc3e2a947de26bc25d42cbe3
  

Comments

Andrew Burgess July 23, 2024, 10:01 a.m. UTC | #1
Simon Marchi <simon.marchi@efficios.com> writes:

> I noticed that the lm_info_frv objects created in frv_current_sos are
> never moved to the solib object.  This bug was introduced in 8971d2788e
> ("gdb: link so_list using intrusive_list"), which mistakenly removed the
> line
>
>     sop->lm_info = std::move (li);
>
> ... probably due so a bad merge conflict resolution.
>
> Re-add this line.
>
> If merged in master, I would cherry-pick this to gdb-15-branch.

LGTM.

Approved-By: Andrew Burgess <aburgess@redhat.com>

Thanks,
Andrew


>
> Change-Id: I609a1a5ad39e93f70a95ea5ebe3f8ff4ab6a8db2
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32005
> ---
>  gdb/solib-frv.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
> index 79052db86f82..f84ff89ffe09 100644
> --- a/gdb/solib-frv.c
> +++ b/gdb/solib-frv.c
> @@ -382,6 +382,8 @@ frv_current_sos ()
>  	  li->map = loadmap;
>  	  li->got_value = got_addr;
>  	  li->lm_addr = lm_addr;
> +	  sop->lm_info = std::move (li);
> +
>  	  /* Fetch the name.  */
>  	  addr = extract_unsigned_integer (lm_buf.l_name,
>  					   sizeof (lm_buf.l_name),
>
> base-commit: 6fc24c7607ba54a2fc3e2a947de26bc25d42cbe3
> -- 
> 2.45.2
  
Simon Marchi July 23, 2024, 2:38 p.m. UTC | #2
On 2024-07-23 06:01, Andrew Burgess wrote:
> Simon Marchi <simon.marchi@efficios.com> writes:
> 
>> I noticed that the lm_info_frv objects created in frv_current_sos are
>> never moved to the solib object.  This bug was introduced in 8971d2788e
>> ("gdb: link so_list using intrusive_list"), which mistakenly removed the
>> line
>>
>>     sop->lm_info = std::move (li);
>>
>> ... probably due so a bad merge conflict resolution.
>>
>> Re-add this line.
>>
>> If merged in master, I would cherry-pick this to gdb-15-branch.
> 
> LGTM.
> 
> Approved-By: Andrew Burgess <aburgess@redhat.com>
> 
> Thanks,
> Andrew

Pushed to both branches, thanks.

Simon
  

Patch

diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index 79052db86f82..f84ff89ffe09 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -382,6 +382,8 @@  frv_current_sos ()
 	  li->map = loadmap;
 	  li->got_value = got_addr;
 	  li->lm_addr = lm_addr;
+	  sop->lm_info = std::move (li);
+
 	  /* Fetch the name.  */
 	  addr = extract_unsigned_integer (lm_buf.l_name,
 					   sizeof (lm_buf.l_name),