Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: gdb-patches@sources.redhat.com
Subject: Re: [patch] more hppa cleanups :)
Date: Fri, 09 Apr 2004 05:38:00 -0000	[thread overview]
Message-ID: <20040409060618.GP750@tausq.org> (raw)
In-Reply-To: <20040409055922.GO750@tausq.org>

In reference to a message from Randolph Chung, dated Apr 08:
> Nothing exciting, just more cleanups :) ok to commit?

sorry, that was the wrong patch. please consider this one instead.

2004-04-08  Randolph Chung  <tausq@debian.org>

	* hppa-tdep.c (hppa_reg_struct_has_addr): 
	Rename to hppa_use_struct_convention.
	(hppa_skip_prologue, hppa_skip_trampoline_code,
	hppa_in_solib_call_trampoline, hppa_in_solib_return_trampoline,
	hppa_cannot_store_register, hppa_smash_text_address, 
	hppa_target_read_pc, hppa_target_write_pc): Make static.
	(hppa_gdbarch_init): Set gdbarch_use_struct_convention

--- gdb/gdb/hppa-tdep.c.orig2	2004-04-08 22:03:40.896087672 -0700
+++ gdb/gdb/hppa-tdep.c	2004-04-08 22:35:51.834540408 -0700
@@ -123,17 +123,8 @@
 static void record_text_segment_lowaddr (bfd *, asection *, void *);
 /* FIXME: brobecker 2002-11-07: We will likely be able to make the
    following functions static, once we hppa is partially multiarched.  */
-int hppa_reg_struct_has_addr (int gcc_p, struct type *type);
-CORE_ADDR hppa_skip_prologue (CORE_ADDR pc);
-CORE_ADDR hppa_skip_trampoline_code (CORE_ADDR pc);
-int hppa_in_solib_call_trampoline (CORE_ADDR pc, char *name);
-int hppa_in_solib_return_trampoline (CORE_ADDR pc, char *name);
 int hppa_pc_requires_run_before_use (CORE_ADDR pc);
 int hppa_instruction_nullified (void);
-int hppa_cannot_store_register (int regnum);
-CORE_ADDR hppa_smash_text_address (CORE_ADDR addr);
-CORE_ADDR hppa_target_read_pc (ptid_t ptid);
-void hppa_target_write_pc (CORE_ADDR v, ptid_t ptid);
 
 /* Handle 32/64-bit struct return conventions.  */
 
@@ -1006,7 +997,7 @@
 /* Get the PC from %r31 if currently in a syscall.  Also mask out privilege
    bits.  */
 
-CORE_ADDR
+static CORE_ADDR
 hppa_target_read_pc (ptid_t ptid)
 {
   int flags = read_register_pid (FLAGS_REGNUM, ptid);
@@ -1023,7 +1014,7 @@
 /* Write out the PC.  If currently in a syscall, then also write the new
    PC value into %r31.  */
 
-void
+static void
 hppa_target_write_pc (CORE_ADDR v, ptid_t ptid)
 {
   int flags = read_register_pid (FLAGS_REGNUM, ptid);
@@ -1080,7 +1071,7 @@
    Note we return one for *any* call trampoline (long-call, arg-reloc), not
    just shared library trampolines (import, export).  */
 
-int
+static int
 hppa_in_solib_call_trampoline (CORE_ADDR pc, char *name)
 {
   struct minimal_symbol *minsym;
@@ -1241,7 +1232,7 @@
    Note we return one for *any* call trampoline (long-call, arg-reloc), not
    just shared library trampolines (import, export).  */
 
-int
+static int
 hppa_in_solib_return_trampoline (CORE_ADDR pc, char *name)
 {
   struct unwind_table_entry *u;
@@ -1314,7 +1305,7 @@
    calling an argument relocation stub.  It even handles some stubs
    used in dynamic executables.  */
 
-CORE_ADDR
+static CORE_ADDR
 hppa_skip_trampoline_code (CORE_ADDR pc)
 {
   long orig_pc = pc;
@@ -1996,7 +1987,7 @@
    Currently we must not skip more on the alpha, but we might the lenient
    stuff some day.  */
 
-CORE_ADDR
+static CORE_ADDR
 hppa_skip_prologue (CORE_ADDR pc)
 {
   unsigned long inst;
@@ -2440,8 +2431,8 @@
   /* We can leave the tail's space the same, since there's no jump.  */
 }
 
-int
-hppa_reg_struct_has_addr (int gcc_p, struct type *type)
+static int
+hppa_use_struct_convention (int gcc_p, struct type *type)
 {
   /* On the PA, any pass-by-value structure > 8 bytes is actually passed
      via a pointer regardless of its type or the compiler used.  */
@@ -2515,7 +2506,7 @@
 /* Return True if REGNUM is not a register available to the user
    through ptrace().  */
 
-int
+static int
 hppa_cannot_store_register (int regnum)
 {
   return (regnum == 0
@@ -2525,7 +2516,7 @@
 
 }
 
-CORE_ADDR
+static CORE_ADDR
 hppa_smash_text_address (CORE_ADDR addr)
 {
   /* The low two bits of the PC on the PA contain the privilege level.
@@ -2669,6 +2660,8 @@
   set_gdbarch_read_pc (gdbarch, hppa_target_read_pc);
   set_gdbarch_write_pc (gdbarch, hppa_target_write_pc);
 
+  set_gdbarch_use_struct_convention (gdbarch, hppa_use_struct_convention);
+
   /* Helper for function argument information.  */
   set_gdbarch_fetch_pointer_argument (gdbarch, hppa_fetch_pointer_argument);
 


      reply	other threads:[~2004-04-09  5:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-09  5:31 Randolph Chung
2004-04-09  5:38 ` Randolph Chung [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040409060618.GP750@tausq.org \
    --to=randolph@tausq.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox