This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [PATCH} Minor bug fix in arch-utils.c


Andrew Cagney wrote:
> 
> > The following is a one line patch to
> > end a segmentation fault when the
> > command 'info architecture' is used
> > on GDB running on a SUSE-7.0 Linux
> > system.
> >
> >
> > 2001-04-26  John S Kallal  <jskallal@home.com>
> >
> > * arch-utils.c/info_architecture: Remove 2nd
> >  pointer list update to correctly follow
> >  linked list.
> 
> Yes, I've seen this patch twice now.  While an obvious fix, I'm going to
> check in the attached.  The ``info architecture'' command can simply be
> deleted.
> 
>         Andrew

Ouch!  Isn't it any useful?  At least as a "maintenance" command?

Fernando

> 
>   ------------------------------------------------------------------------
> 2001-05-09  Andrew Cagney  <ac131313@redhat.com>
> 
>         * arch-utils.c (initialize_current_architecture): Delete obsolete
>         ``info architecture'' command.
> 
> *** /home/scratch/GDB/src/gdb/arch-utils.c      Tue May  8 11:58:38 2001
> --- arch-utils.c        Wed May  9 16:17:00 2001
> ***************
> *** 586,625 ****
>     show_architecture (NULL, from_tty);
>   }
> 
> - /* Called if the user enters ``info architecture'' without an argument. */
> -
> - static void
> - info_architecture (char *args, int from_tty)
> - {
> -   printf_filtered ("Available architectures are:\n");
> -   if (GDB_MULTI_ARCH)
> -     {
> -       const char **arches = gdbarch_printable_names ();
> -       const char **arch;
> -       for (arch = arches; *arch != NULL; arch++)
> -       {
> -         printf_filtered (" %s", *arch);
> -       }
> -       xfree (arches);
> -     }
> -   else
> -     {
> -       enum bfd_architecture a;
> -       for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
> -       {
> -         const struct bfd_arch_info *ap;
> -         for (ap = bfd_lookup_arch (a, 0);
> -              ap != NULL;
> -              ap = ap->next)
> -           {
> -             printf_filtered (" %s", ap->printable_name);
> -             ap = ap->next;
> -           }
> -       }
> -     }
> -   printf_filtered ("\n");
> - }
> -
>   /* Set the dynamic target-system-dependent parameters (architecture,
>      byte-order) using information found in the BFD */
> 
> --- 586,591 ----
> ***************
> *** 759,767 ****
>          current setting. */
>       add_cmd ("architecture", class_support, show_architecture,
>              "Show the current target architecture", &showlist);
> -     c = add_cmd ("architecture", class_support, info_architecture,
> -                "List supported target architectures", &infolist);
> -     deprecate_cmd (c, "set architecture");
>     }
>   }
> 
> --- 725,730 ----

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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