From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: Andrew Cagney Cc: John S Kallal , Adam Mirowski , gdb-patches@sources.redhat.com Subject: Re: [PATCH} Minor bug fix in arch-utils.c Date: Thu, 10 May 2001 09:26:00 -0000 Message-id: <3AFAC0A5.222B3B4C@redhat.com> References: <000701c0cea9$7b18ed80$6401a8c0@cn986452a> <3AF9A729.6090207@cygnus.com> X-SW-Source: 2001-05/msg00157.html 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 > > > > * 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 > > * 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