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]

RFA: "info architecture" crashes gdb if GDB_MULTI_ARCH is 0


Hello.

Here is a patch proposal for fixing a crash occurring if the "info
architecture" command is performed when GDB_MULTI_ARCH is 0. This
happens with gdb for ChorusOS on x86.

I hope this is the correct way of submitting fixes...

Our gdb is not using the latest version of the file, but the bug is
still present in the latest sources.

Thanks.
-Adam


2001-04-13  Adam Mirowski  <Adam.Mirowski@Sun.COM>

	* arch-utils.c (info_architecture): If GDB_MULTI_ARCH was 0,
	the "info architecture" command crashed gdb. Fixed an error in
	the scanning of the list of bfd_arch_info structures (duplicate
	"next" pointer dereferencing).


Index: gdb/arch-utils.c
------- arch-utils.c -------
*** /tmp/dbCKiV_	Fri Apr 13 19:39:05 2001
--- arch-utils.c	Fri Apr 13 19:20:03 2001
***************
*** 532,541 ****
  	  for (ap = bfd_lookup_arch (a, 0);
  	       ap != NULL;
  	       ap = ap->next)
! 	    {
! 	      printf_filtered (" %s", ap->printable_name);
! 	      ap = ap->next;
! 	    }
  	}
      }
    printf_filtered ("\n");
--- 532,538 ----
  	  for (ap = bfd_lookup_arch (a, 0);
  	       ap != NULL;
  	       ap = ap->next)
! 	    printf_filtered (" %s", ap->printable_name);
  	}
      }
    printf_filtered ("\n");


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