From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26788 invoked by alias); 10 May 2010 21:54:31 -0000 Received: (qmail 26780 invoked by uid 22791); 10 May 2010 21:54:30 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 May 2010 21:54:25 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E9CB02BABB6 for ; Mon, 10 May 2010 17:54:23 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ktd4uRyNRZWk for ; Mon, 10 May 2010 17:54:23 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B088E2BABAD for ; Mon, 10 May 2010 17:54:23 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 879F5F58F9; Mon, 10 May 2010 14:54:21 -0700 (PDT) Date: Mon, 10 May 2010 21:54:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: RFC: new struct breakpoint component cond_language... Message-ID: <20100510215421.GJ2957@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00237.txt.bz2 Hello, As mentioned in an earlier email, I think that there are a few areas in the current GDB behavior where the ideal behavior still needs to be defined. This is only relevant when debugging a multi-language application. So, to recap, the situation is the following: the current language is "auto; currently c", and the user is inserting a breakpoint inside some code that is Ada. So far, there seems to be a consensus that, because the language mode is "auto", the breakpoint should be parsed using Ada, rather than the current language (C). Breakpoints already store the language that was used to create it. This is the language that was used to parse the linespec. When creating a breakpoint from the command-line, it is always the current_language, even when the language mode is auto. So, taking both of these elements into account, I deduce that breakpoints should also store a condition_language which should be used in order to parse our condition, because it can be different from the breakpoint language. Expression carry the language that was used to create them, but breakpoint conditions are not always immediately parsed - so some breakpoints have a condition, but no corresponding condition expression. So, I don't think we have any choice but to add a new language field. I propose cond_language (the expression is called "cond" and the litteral expression is called "cond_string"). Once we have this condition language, we can move the logic for computing the condition language out of parse.c into breakpoint.c, and use that field as a parameter when calling the parse routines (this is dependent on http://www.sourceware.org/ml/gdb-patches/2010-05/msg00236.html). Sounds reasonable? -- Joel