Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa/rfc:ppc] svr4 and not just ELFOSABI_LINUX for function parsing et.al.
@ 2002-04-21 21:29 Andrew Cagney
  2002-04-22  0:59 ` Kevin Buettner
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-04-21 21:29 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

Hello,

I was finding that for a non-GNU/Linux SVR4 PPC platform malloc() was 
failing because RS6000 TOC func-ptr code was being selected:

       /* Handle RS/6000 function pointers.  */
       set_gdbarch_convert_from_func_ptr_addr (gdbarch,
         rs6000_convert_from_func_ptr_addr);

the attached patch changes things to select all of:

       set_gdbarch_frameless_function_invocation (gdbarch,
         ppc_linux_frameless_function_invocation);
       set_gdbarch_frame_chain (gdbarch, ppc_linux_frame_chain);
       set_gdbarch_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc);

       set_gdbarch_frame_init_saved_regs (gdbarch,
                                          ppc_linux_frame_init_saved_regs);
       set_gdbarch_init_extra_frame_info (gdbarch,
                                          ppc_linux_init_extra_frame_info);

       set_gdbarch_memory_remove_breakpoint (gdbarch,
 
ppc_linux_memory_remove_breakpoint);
       set_solib_svr4_fetch_link_map_offsets
         (gdbarch, ppc_linux_svr4_fetch_link_map_offsets);

when svr4_abi.  It certainly improves things (fails went from 136 -> 80) 
  but I'm not 100% certain if this is correct for all the above - I 
suspect it is overkill :-/

Andrew



[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 872 bytes --]

2002-04-21  Andrew Cagney  <ac131313@redhat.com>

	* rs6000-tdep.c (rs6000_gdbarch_init): Set
	frameless_function_invocation et.al. when sysv_abi and not just
	ELFOSABI_LINUX.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.59
diff -u -r1.59 rs6000-tdep.c
--- rs6000-tdep.c	20 Apr 2002 03:09:28 -0000	1.59
+++ rs6000-tdep.c	22 Apr 2002 04:17:40 -0000
@@ -2720,7 +2720,7 @@
   set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
   /* Note: kevinb/2002-04-12: See note above regarding *_push_arguments().
      The same remarks hold for the methods below.  */
-  if (osabi == ELFOSABI_LINUX && wordsize == 4)
+  if (sysv_abi && wordsize == 4)
     {
       set_gdbarch_frameless_function_invocation (gdbarch,
 	ppc_linux_frameless_function_invocation);

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

* Re: [rfa/rfc:ppc] svr4 and not just ELFOSABI_LINUX for function parsing et.al.
  2002-04-21 21:29 [rfa/rfc:ppc] svr4 and not just ELFOSABI_LINUX for function parsing et.al Andrew Cagney
@ 2002-04-22  0:59 ` Kevin Buettner
  2002-04-25 21:31   ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2002-04-22  0:59 UTC (permalink / raw)
  To: Andrew Cagney, gdb-patches

On Apr 22, 12:29am, Andrew Cagney wrote:

> I was finding that for a non-GNU/Linux SVR4 PPC platform malloc() was 
> failing because RS6000 TOC func-ptr code was being selected:
> 
>        /* Handle RS/6000 function pointers.  */
>        set_gdbarch_convert_from_func_ptr_addr (gdbarch,
>          rs6000_convert_from_func_ptr_addr);
> 
> the attached patch changes things to select all of:
> 
>        set_gdbarch_frameless_function_invocation (gdbarch,
>          ppc_linux_frameless_function_invocation);
>        set_gdbarch_frame_chain (gdbarch, ppc_linux_frame_chain);
>        set_gdbarch_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc);
> 
>        set_gdbarch_frame_init_saved_regs (gdbarch,
>                                           ppc_linux_frame_init_saved_regs);
>        set_gdbarch_init_extra_frame_info (gdbarch,
>                                           ppc_linux_init_extra_frame_info);
> 
>        set_gdbarch_memory_remove_breakpoint (gdbarch,
>  
> ppc_linux_memory_remove_breakpoint);
>        set_solib_svr4_fetch_link_map_offsets
>          (gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
> 
> when svr4_abi.  It certainly improves things (fails went from 136 -> 80) 
>   but I'm not 100% certain if this is correct for all the above - I 
> suspect it is overkill :-/

It looks okay to me.  I have no problem with you checking it in.

Kevin


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

* Re: [rfa/rfc:ppc] svr4 and not just ELFOSABI_LINUX for function parsing et.al.
  2002-04-22  0:59 ` Kevin Buettner
@ 2002-04-25 21:31   ` Andrew Cagney
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2002-04-25 21:31 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

> ppc_linux_memory_remove_breakpoint);
>> set_solib_svr4_fetch_link_map_offsets
>> (gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
>> 
>> when svr4_abi.  It certainly improves things (fails went from 136 -> 80) 
>> but I'm not 100% certain if this is correct for all the above - I 
>> suspect it is overkill :-/
> 
> 
> It looks okay to me.  I have no problem with you checking it in.

I did :-)  I chopped it back to fix just the immediate problem.  The 
number of fails went from 136->83.

I'll figure out where those extra three are hiding separatly.

thanks!
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 901 bytes --]

2002-04-26  Andrew Cagney  <ac131313@redhat.com>

	* rs6000-tdep.c (rs6000_gdbarch_init): Only set
	convert_from_func_ptr-addr when AIX / PowerOpen.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.59
diff -u -r1.59 rs6000-tdep.c
--- rs6000-tdep.c	20 Apr 2002 03:09:28 -0000	1.59
+++ rs6000-tdep.c	26 Apr 2002 04:24:07 -0000
@@ -2746,8 +2746,11 @@
 
       set_gdbarch_frame_init_saved_regs (gdbarch, rs6000_frame_init_saved_regs);
       set_gdbarch_init_extra_frame_info (gdbarch, rs6000_init_extra_frame_info);
-
-      /* Handle RS/6000 function pointers.  */
+    }
+  if (!sysv_abi)
+    {
+      /* Handle RS/6000 function pointers (which are really function
+         descriptors).  */
       set_gdbarch_convert_from_func_ptr_addr (gdbarch,
 	rs6000_convert_from_func_ptr_addr);
     }

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

end of thread, other threads:[~2002-04-26  4:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-21 21:29 [rfa/rfc:ppc] svr4 and not just ELFOSABI_LINUX for function parsing et.al Andrew Cagney
2002-04-22  0:59 ` Kevin Buettner
2002-04-25 21:31   ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox