From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7420 invoked by alias); 31 Aug 2013 21:43:23 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 7387 invoked by uid 48); 31 Aug 2013 21:43:23 -0000 From: "mjw at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/15826] Slow symbol lookups during conditional breakpoints Date: Sat, 31 Aug 2013 21:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mjw at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00303.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=15826 --- Comment #5 from Mark Wielaard --- It does seem the boolean standard type is "extra special": struct type * language_bool_type (const struct language_defn *la, struct gdbarch *gdbarch) { struct language_gdbarch *ld = gdbarch_data (gdbarch, language_gdbarch_data); if (ld->arch_info[la->la_language].bool_type_symbol) { struct symbol *sym; sym = lookup_symbol (ld->arch_info[la->la_language].bool_type_symbol, NULL, VAR_DOMAIN, NULL); if (sym) { struct type *type = SYMBOL_TYPE (sym); if (type && TYPE_CODE (type) == TYPE_CODE_BOOL) return type; } } return ld->arch_info[la->la_language].bool_type_default; } The above is why "bool" is always looked up. Other standard types don't have this extra lookup to override the default. cplus_language_arch_info () does set bool_type_symbol = "bool". But is that really correct? You cannot override bool in C++ since it is a built-in type. So, possible, untested, "fix": diff --git a/gdb/c-lang.c b/gdb/c-lang.c index 48a1fb0..e2201b4 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -931,7 +931,7 @@ cplus_language_arch_info (struct gdbarch *gdbarch, lai->primitive_type_vector [cplus_primitive_type_declong] = builtin->builtin_declong; - lai->bool_type_symbol = "bool"; + lai->bool_type_symbol = NULL; // "bool" is always a built-in type. lai->bool_type_default = builtin->builtin_bool; } -- You are receiving this mail because: You are on the CC list for the bug.