From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22179 invoked by alias); 4 Apr 2003 06:42:02 -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 22172 invoked from network); 4 Apr 2003 06:42:01 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by sources.redhat.com with SMTP; 4 Apr 2003 06:42:01 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id h346fwf16003; Fri, 4 Apr 2003 00:41:58 -0600 Date: Fri, 04 Apr 2003 06:42:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200304040641.h346fwf16003@duracef.shout.net> To: drow@mvista.com, ezannoni@redhat.com Subject: Re: RFA/dwarf: Fix the GCC 2.95.3 store.exp regression for multi-register variables Cc: gdb-patches@sources.redhat.com X-SW-Source: 2003-04/txt/msg00062.txt.bz2 My test bed says that this is okay. It fixes the regression in store.exp with gcc 2.95.3 -gdwarf-2 (gcc 2.95.3 is the only compiler that puts this particular struct into a register). And it doesn't have any regressions with any gcc v2 or v3, dwarf-2 or stabs+, on my native i686-pc-linux-gnu. I have another PR for this, gdb/1107, that comes with a source file and an executable file. With this patch, gdb HEAD changes from 'new bad behavior' back to 'same bad behavior as 5.3'. Specifically, I have a structure which is in %ebx and %esi. gdb 5.3 prints values from %ebx and %esp (the next register in 'info registers'). gdb HEAD prints %ebx and something from god knows where, and gdb HEAD + patch prints %ebx and %esp again. (I really hate it when gdb prints the wrong numbers!) With this patch gdb is better in the store.exp case and not any worse in the gdb/1107 case. What the heck, here's a table: store.exp gdb/1107 gdb 5.3 okay wrong gdb HEAD wrong wrong gdb HEAD + drow okay wrong So ... recommended for approval. If it goes in then we can maybe talk about gdb/1107 some more. Michael C === 2003-03-12 Daniel Jacobowitz * dwarf2expr.h (struct dwarf_expr_context): Remove extra arguments to read_reg and update its comment. Remove regnum member. * dwarf2expr.c (execute_stack_op): Remove memaddr and expr_lval. Don't call read_reg when setting in_reg. Call read_reg to get the frame base if it's in a register. Return the register number on the stack instead of in the context. Remove extra arguments to read_reg. * dwarf2loc.c (dwarf_expr_read_reg): Remove extra arguments. (dwarf2_evaluate_loc_desc): Call value_from_register. Expect the register number on the expression stack. (needs_frame_read_reg): Remove extra arguments.