From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27396 invoked by alias); 17 May 2012 08:42:07 -0000 Received: (qmail 27372 invoked by uid 22791); 17 May 2012 08:42:04 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KAM_STOCKGEN,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ob0-f169.google.com (HELO mail-ob0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 May 2012 08:41:40 +0000 Received: by obbwd18 with SMTP id wd18so2812612obb.0 for ; Thu, 17 May 2012 01:41:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.47.66 with SMTP id b2mr5708109obn.2.1337244100039; Thu, 17 May 2012 01:41:40 -0700 (PDT) Received: by 10.182.124.65 with HTTP; Thu, 17 May 2012 01:41:40 -0700 (PDT) Date: Thu, 17 May 2012 08:42:00 -0000 Message-ID: Subject: problem while probing the local variables From: chansarav To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00075.txt.bz2 Hi, I am porting gdb (7.3.1) for the first time to a 32 bit VLIW architecture. I have added the bfd files, architecture descriptions files by studying the reference ports. Now the ported gdb is able to do the following basic operations: 1. Inserting/removing breakpoints 2. probing the global variables at a particular breakpoint But I face problem while probing the local variables during execution at a particular breakpoint. (Note: I build the application for debug mode in which no optimization is performed by the compiler tool chain). Please consider the following example case: 1 . #define N 1000 2 . 3 . int global_var1 = 0; 4 . int global_var2 = 1; 5 . 6 . void func (int arg) 7 . { 8 . global_var2 = arg; 9 . } 10. 11. int main() 12. { 13. int i; 14. int result = 0; 15. int A[N]; 16. 17. global_var1 = 2; 18. 19. for (i=0; i= DW_OP_breg0 && base_data[0] <= DW_OP_breg31) { const gdb_byte *buf_end; frame_reg = base_data[0] - DW_OP_breg0; buf_end = read_sleb128 (base_data + 1, base_data + base_size, &base_offset); if (buf_end != base_data + base_size) error (_("Unexpected opcode after " "DW_OP_breg%u for symbol \"%s\"."), frame_reg, SYMBOL_PRINT_NAME (symbol)); } -- cut -- Function: locexpr_describe_location_piece () File: dwarf2loc.c >From this I get the understanding of that there could be problem with the dwarf information generated. I should check the dwarf information generated regarding this issue. Is my understanding correct? 3. On debugging for the message "No symbol "result" in current context.", I found that in function parse_exp_in_context () of file parse.c the exception is thrown by 'lang->la_parser ()'. I couldn't understand what goes wrong here. Could anyone direct me on this? Thanks, Chandra Kumar R.