Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Add multiarch initialization code for hppa targets
Date: Thu, 07 Nov 2002 07:10:00 -0000	[thread overview]
Message-ID: <3DCA8257.6030609@redhat.com> (raw)
In-Reply-To: <20021107075816.GT5164@gnat.com>

Yep!

> I committed the following patch to the trunk. I am not quite sure that I
> used the right mechanism to search through the list of gdbarches, but
> the patch is pretty harmless anyway. So I went ahead an applied the
> multiarch-changes-are-obvious rules. I would appreciate if a multiarch
> guru had a look and told me this is ok or not.
> 
> 2002-11-06  Joel Brobecker  <brobecker@gnat.com>
> 
>       Put in place the framework necessary for multiarching the hppa targets.
>       * hppa-tdep.c (hppa_gdbarch_init): New function.
>       (hppa_dump_tdep): New function.
>       (_initialize_hppa_tdep): Register the hppa gdbarch init function and
>       tdep structure dumper.
>       * config/pa/tm-hppa.h (GDB_MULTI_ARCH): New macro, defined to 0
>       until the multi-arching conversion has partially been completed.
> 
> This has been tested on hppa2.0w-hp-hpux11.00.
> 
> -- Joel
> 
> 
> 
> Index: hppa-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
> retrieving revision 1.30
> diff -c -3 -p -r1.30 hppa-tdep.c
> *** hppa-tdep.c	7 Nov 2002 02:19:56 -0000	1.30
> --- hppa-tdep.c	7 Nov 2002 07:37:23 -0000
> *************** hppa_extract_return_value (struct type *
> *** 4724,4729 ****
> --- 4724,4751 ----
>   	    TYPE_LENGTH (type));
>   }
>   
> + static struct gdbarch *
> + hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
> + {
> +   struct gdbarch *gdbarch;
> + 
> +   /* find a candidate among the list of pre-declared architectures.  */
> +   arches = gdbarch_list_lookup_by_info (arches, &info);
> +   if (arches != NULL)
> +     return (arches->gdbarch);
> + 
> +   /* If none found, then allocate and initialize one.  */
> +   gdbarch = gdbarch_alloc (&info, NULL);
> + 
> +   return gdbarch;
> + }
> + 
> + static void
> + hppa_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
> + {
> +    /* Nothing to print for the moment.  */
> + }
> + 
>   void
>   _initialize_hppa_tdep (void)
>   {
> *************** _initialize_hppa_tdep (void)
> *** 4732,4737 ****
> --- 4754,4760 ----
>     void tbreak_at_finish_command (char *arg, int from_tty);
>     void break_at_finish_at_depth_command (char *arg, int from_tty);
>   
> +   gdbarch_register (bfd_arch_hppa, hppa_gdbarch_init, hppa_dump_tdep);
>     tm_print_insn = print_insn_hppa;
>   
>     add_cmd ("unwind", class_maintenance, unwind_command,
> Index: config/pa/tm-hppa.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/pa/tm-hppa.h,v
> retrieving revision 1.19
> diff -c -3 -p -r1.19 tm-hppa.h
> *** config/pa/tm-hppa.h	26 Oct 2002 17:19:28 -0000	1.19
> --- config/pa/tm-hppa.h	7 Nov 2002 07:37:24 -0000
> ***************
> *** 24,29 ****
> --- 24,31 ----
>   
>   #include "regcache.h"
>   
> + #define GDB_MULTI_ARCH 0
> + 
>   /* Forward declarations of some types we use in prototypes */
>   
>   struct frame_info;



      reply	other threads:[~2002-11-07 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-06 23:55 Joel Brobecker
2002-11-07  7:10 ` Andrew Cagney [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=3DCA8257.6030609@redhat.com \
    --to=ac131313@redhat.com \
    --cc=brobecker@gnat.com \
    --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