From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18305 invoked by alias); 13 Sep 2003 00:05:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18298 invoked from network); 13 Sep 2003 00:05:13 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 13 Sep 2003 00:05:13 -0000 Received: by zenia.home (Postfix, from userid 5433) id 5A8E720758; Fri, 12 Sep 2003 19:03:17 -0500 (EST) To: gdb-patches@sources.redhat.com Subject: PATCH: fall back to rodata section's offset if no .data or .bss From: Jim Blandy Date: Sat, 13 Sep 2003 00:05:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-09/txt/msg00280.txt.bz2 2003-09-12 Jim Blandy * dbxread.c (read_dbx_symtab): If we have no .data section and no .bss section, presume that any variables we find live in the .rodata section. Index: gdb/dbxread.c =================================================================== RCS file: /cvs/src/src/gdb/dbxread.c,v retrieving revision 1.52 diff -c -r1.52 dbxread.c *** gdb/dbxread.c 12 Sep 2003 23:34:55 -0000 1.52 --- gdb/dbxread.c 12 Sep 2003 23:35:58 -0000 *************** *** 1380,1385 **** --- 1380,1387 ---- data_sect_index = objfile->sect_index_data; if (data_sect_index == -1) data_sect_index = SECT_OFF_BSS (objfile); + if (data_sect_index == -1) + data_sect_index = SECT_OFF_RODATA (objfile); gdb_assert (data_sect_index != -1); for (symnum = 0; symnum < DBX_SYMCOUNT (objfile); symnum++)