This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 08/25] gdb/mn10300: Use default gdbarch methods where possible


On Wed, 27 Mar 2019 21:34:04 +0000
Andrew Burgess <andrew.burgess@embecosm.com> wrote:

> Make use of the default gdbarch methods for gdbarch_dummy_id,
> gdbarch_unwind_pc, and gdbarch_unwind_sp where possible.
> 
> I have not tested this change but, by inspecting the code, I believe
> the default methods are equivalent to the code being deleted.
> 
> gdb/ChangeLog:
> 
> 	* mn10300-tdep.c (mn10300_dummy_id): Delete.
> 	(mn10300_unwind_pc): Delete.
> 	(mn10300_unwind_sp): Delete.
> 	(mn10300_frame_unwind_init): Don't register deleted functions with
> 	gdbarch.

Please mention change to mn10300_push_dummy_call in ChangeLog entry...

>  /* Function: push_dummy_call
> @@ -1308,7 +1278,7 @@ mn10300_push_dummy_call (struct gdbarch *gdbarch,
>    {
>      CORE_ADDR func_addr = find_function_addr (target_func, NULL);
>      CORE_ADDR unwound_sp 
> -      = mn10300_unwind_sp (gdbarch, create_new_frame (sp, func_addr));
> +      = gdbarch_unwind_sp (gdbarch, create_new_frame (sp, func_addr));
>      if (sp != unwound_sp)
>        regcache_cooked_write_unsigned (regcache, E_SP_REGNUM,
>                                        sp - (unwound_sp - sp));

Otherwise, okay.

Kevin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]