From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16872 invoked by alias); 13 May 2010 22:06:43 -0000 Received: (qmail 16863 invoked by uid 22791); 13 May 2010 22:06:42 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 May 2010 22:06:39 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id BE9A313061 for ; Thu, 13 May 2010 15:06:37 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost3.vmware.com (Postfix) with ESMTP id B3906CD903 for ; Thu, 13 May 2010 15:06:37 -0700 (PDT) Message-ID: <4BEC77ED.4050604@vmware.com> Date: Thu, 13 May 2010 22:48:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: Re: [ob] gdbarch.sh, arch-utils.c, white space References: <4BEC75DF.80206@vmware.com> In-Reply-To: <4BEC75DF.80206@vmware.com> Content-Type: multipart/mixed; boundary="------------070908040807030409010607" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00291.txt.bz2 This is a multi-part message in MIME format. --------------070908040807030409010607 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 95 Michael Snyder wrote: > add blank line between decls and statements Oops, here's the patch... --------------070908040807030409010607 Content-Type: text/plain; name="gdbarch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdbarch.txt" Content-length: 2869 2010-05-13 Michael Snyder * gdbarch.sh: White space, add blank lines. * arch-utils.c: Ditto. * gdbarch.c: Regenerate. Index: gdbarch.sh =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.sh,v retrieving revision 1.510 diff -u -p -r1.510 gdbarch.sh --- gdbarch.sh 7 May 2010 14:00:28 -0000 1.510 +++ gdbarch.sh 13 May 2010 21:54:31 -0000 @@ -1443,6 +1443,7 @@ void * gdbarch_obstack_zalloc (struct gdbarch *arch, long size) { void *data = obstack_alloc (arch->obstack, size); + memset (data, 0, size); return data; } @@ -1458,6 +1459,7 @@ void gdbarch_free (struct gdbarch *arch) { struct obstack *obstack; + gdb_assert (arch != NULL); gdb_assert (!arch->initialized_p); obstack = arch->obstack; @@ -1479,6 +1481,7 @@ verify_gdbarch (struct gdbarch *gdbarch) struct cleanup *cleanups; long length; char *buf; + log = mem_fileopen (); cleanups = make_cleanup_ui_file_delete (log); /* fundamental */ @@ -1543,6 +1546,7 @@ void gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) { const char *gdb_nm_file = ""; + #if defined (GDB_NM_FILE) gdb_nm_file = GDB_NM_FILE; #endif @@ -1747,7 +1751,8 @@ gdbarch_data_register (gdbarch_data_pre_ gdbarch_data_post_init_ftype *post_init) { struct gdbarch_data_registration **curr; - /* Append the new registraration. */ + + /* Append the new registration. */ for (curr = &gdbarch_data_registry.registrations; (*curr) != NULL; curr = &(*curr)->next); @@ -1866,6 +1871,7 @@ gdbarch_printable_names (void) int nr_arches = 0; const char **arches = NULL; struct gdbarch_registration *rego; + for (rego = gdbarch_registry; rego != NULL; rego = rego->next) @@ -1894,6 +1900,7 @@ gdbarch_register (enum bfd_architecture { struct gdbarch_registration **curr; const struct bfd_arch_info *bfd_arch_info; + /* Check that BFD recognizes this architecture */ bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); if (bfd_arch_info == NULL) Index: arch-utils.c =================================================================== RCS file: /cvs/src/src/gdb/arch-utils.c,v retrieving revision 1.188 diff -u -p -r1.188 arch-utils.c --- arch-utils.c 6 May 2010 19:41:11 -0000 1.188 +++ arch-utils.c 13 May 2010 21:54:31 -0000 @@ -533,6 +533,7 @@ gdbarch_from_bfd (bfd *abfd) { struct gdbarch_info info; gdbarch_info_init (&info); + info.abfd = abfd; return gdbarch_find_by_info (info); } @@ -580,9 +581,9 @@ void initialize_current_architecture (void) { const char **arches = gdbarch_printable_names (); + struct gdbarch_info info; /* determine a default architecture and byte order. */ - struct gdbarch_info info; gdbarch_info_init (&info); /* Find a default architecture. */ --------------070908040807030409010607--