public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Add osabi support.
@ 2018-07-04  0:16 Jim Wilson
  2018-07-04  9:11 ` Andrew Burgess
  0 siblings, 1 reply; 6+ messages in thread
From: Jim Wilson @ 2018-07-04  0:16 UTC (permalink / raw)
  To: gdb-patches; +Cc: andrew.burgess, Jim Wilson

This adds the osabi init call that the linux native port needs.

	gdb/
	* riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
---
 gdb/riscv-tdep.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index 154567136e..1b941eee55 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -2562,6 +2562,9 @@ riscv_gdbarch_init (struct gdbarch_info info,
     user_reg_add (gdbarch, riscv_register_aliases[i].name,
 		  value_of_riscv_user_reg, &riscv_register_aliases[i].regnum);
 
+  /* Hook in OS ABI-specific overrides, if they have been registered.  */
+  gdbarch_init_osabi (info, gdbarch);
+
   return gdbarch;
 }
 
-- 
2.17.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RISC-V: Add osabi support.
  2018-07-04  0:16 [PATCH] RISC-V: Add osabi support Jim Wilson
@ 2018-07-04  9:11 ` Andrew Burgess
  2018-07-05 22:26   ` John Baldwin
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Burgess @ 2018-07-04  9:11 UTC (permalink / raw)
  To: Jim Wilson; +Cc: gdb-patches

* Jim Wilson <jimw@sifive.com> [2018-07-03 17:15:18 -0700]:

> This adds the osabi init call that the linux native port needs.
> 
> 	gdb/
> 	* riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.

I'm happy with this patch, but again wonder if this should be part of
a sequence that adds OS support?

Thanks,
Andrewx

> ---
>  gdb/riscv-tdep.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
> index 154567136e..1b941eee55 100644
> --- a/gdb/riscv-tdep.c
> +++ b/gdb/riscv-tdep.c
> @@ -2562,6 +2562,9 @@ riscv_gdbarch_init (struct gdbarch_info info,
>      user_reg_add (gdbarch, riscv_register_aliases[i].name,
>  		  value_of_riscv_user_reg, &riscv_register_aliases[i].regnum);
>  
> +  /* Hook in OS ABI-specific overrides, if they have been registered.  */
> +  gdbarch_init_osabi (info, gdbarch);
> +
>    return gdbarch;
>  }
>  
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RISC-V: Add osabi support.
  2018-07-04  9:11 ` Andrew Burgess
@ 2018-07-05 22:26   ` John Baldwin
  2018-07-06 21:39     ` Andrew Burgess
  0 siblings, 1 reply; 6+ messages in thread
From: John Baldwin @ 2018-07-05 22:26 UTC (permalink / raw)
  To: Andrew Burgess, Jim Wilson; +Cc: gdb-patches

On 7/4/18 2:11 AM, Andrew Burgess wrote:
> * Jim Wilson <jimw@sifive.com> [2018-07-03 17:15:18 -0700]:
> 
>> This adds the osabi init call that the linux native port needs.
>>
>> 	gdb/
>> 	* riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
> 
> I'm happy with this patch, but again wonder if this should be part of
> a sequence that adds OS support?

I would be happy to have these bits go in actually as I will probably start
working on FreeBSD RISC-V support in the near future (albeit using
QEMU as my test environment for now).  Having the riscv-tdep.c changes
upstream will make that easier rather than either duplicating that work
or having to temporarily pull it into my own branches.

-- 
John Baldwin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RISC-V: Add osabi support.
  2018-07-05 22:26   ` John Baldwin
@ 2018-07-06 21:39     ` Andrew Burgess
  2018-07-07  1:53       ` Simon Marchi
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Burgess @ 2018-07-06 21:39 UTC (permalink / raw)
  To: John Baldwin; +Cc: Jim Wilson, gdb-patches

* John Baldwin <jhb@FreeBSD.org> [2018-07-05 15:25:54 -0700]:

> On 7/4/18 2:11 AM, Andrew Burgess wrote:
> > * Jim Wilson <jimw@sifive.com> [2018-07-03 17:15:18 -0700]:
> > 
> >> This adds the osabi init call that the linux native port needs.
> >>
> >> 	gdb/
> >> 	* riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
> > 
> > I'm happy with this patch, but again wonder if this should be part of
> > a sequence that adds OS support?
> 
> I would be happy to have these bits go in actually as I will probably start
> working on FreeBSD RISC-V support in the near future (albeit using
> QEMU as my test environment for now).  Having the riscv-tdep.c changes
> upstream will make that easier rather than either duplicating that work
> or having to temporarily pull it into my own branches.

In terms of the code content of this patch (and the other one I
commented on) I'm perfectly happy.

However, I don't feel I'm qualified to give the OK to merge these
given the original push back against merging unused code.  I'd rather
a global maintainer say yes or no.

Thanks,
Andrew


> 
> -- 
> John Baldwin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RISC-V: Add osabi support.
  2018-07-06 21:39     ` Andrew Burgess
@ 2018-07-07  1:53       ` Simon Marchi
  2018-07-16 21:51         ` Jim Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Marchi @ 2018-07-07  1:53 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: John Baldwin, Jim Wilson, gdb-patches

On 2018-07-06 17:39, Andrew Burgess wrote:
> * John Baldwin <jhb@FreeBSD.org> [2018-07-05 15:25:54 -0700]:
> 
>> On 7/4/18 2:11 AM, Andrew Burgess wrote:
>> > * Jim Wilson <jimw@sifive.com> [2018-07-03 17:15:18 -0700]:
>> >
>> >> This adds the osabi init call that the linux native port needs.
>> >>
>> >> 	gdb/
>> >> 	* riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
>> >
>> > I'm happy with this patch, but again wonder if this should be part of
>> > a sequence that adds OS support?
>> 
>> I would be happy to have these bits go in actually as I will probably 
>> start
>> working on FreeBSD RISC-V support in the near future (albeit using
>> QEMU as my test environment for now).  Having the riscv-tdep.c changes
>> upstream will make that easier rather than either duplicating that 
>> work
>> or having to temporarily pull it into my own branches.
> 
> In terms of the code content of this patch (and the other one I
> commented on) I'm perfectly happy.
> 
> However, I don't feel I'm qualified to give the OK to merge these
> given the original push back against merging unused code.  I'd rather
> a global maintainer say yes or no.

I think this is fine.  That line is kind of standard boilerplate in 
gdbarch_init methods.  The <arch>-tdep.c file is not really supposed to 
know what osabi variants exist above it, so it's ok to call it "just in 
case".  It's not like we are adding one thousand lines of not-yet-used 
code :).

Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RISC-V: Add osabi support.
  2018-07-07  1:53       ` Simon Marchi
@ 2018-07-16 21:51         ` Jim Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Jim Wilson @ 2018-07-16 21:51 UTC (permalink / raw)
  To: Simon Marchi; +Cc: Andrew Burgess, John Baldwin, gdb-patches

On Fri, Jul 6, 2018 at 6:53 PM, Simon Marchi <simon.marchi@polymtl.ca> wrote:
>>> >> This adds the osabi init call that the linux native port needs.
>>> >>
>>> >>      gdb/
>>> >>      * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.

This was approved by Andrew (RISC-V) and Simon (global) so I committed it.

Jim

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-16 21:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-04  0:16 [PATCH] RISC-V: Add osabi support Jim Wilson
2018-07-04  9:11 ` Andrew Burgess
2018-07-05 22:26   ` John Baldwin
2018-07-06 21:39     ` Andrew Burgess
2018-07-07  1:53       ` Simon Marchi
2018-07-16 21:51         ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).