From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id P7JLE2CoUWaDbBwAWB0awg (envelope-from ) for ; Sat, 25 May 2024 04:59:12 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=WtbwqR2M; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3A61F1E0C1; Sat, 25 May 2024 04:59:12 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 252081E092 for ; Sat, 25 May 2024 04:59:10 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F3C5385842A for ; Sat, 25 May 2024 08:59:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F3C5385842A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1716627549; bh=xAeRS6cKagurEwcutgQgjxUBhVZiqB0qFt44WWWePl8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=WtbwqR2M4KOALvbDeqoMQX1ri6G0e/INqrxkAiJsNdH+p+d3zzu9Abd9dM3Hbcyh8 8GaHOLl+482zKEirFtBC+S3HVa+BIGAFRzp6R4wmIUzHzEbrl9gHFPG82KYlZRs7as l9eeoPClNEpN1XE5p/ZpxHJ1Eq8l6WGIzCPpvj8k= Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 864D43858D29 for ; Sat, 25 May 2024 08:58:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 864D43858D29 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 864D43858D29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716627513; cv=none; b=K8nputDvtiF9tYyDLiY2Q+mG5/ExlR0C4T0vui5qilNHuFO1NjacQJyky2z57EJy2x9oNogcYswcQ1Gfg4fhvZZNtvyYUFFrjfr/U6VlmwPv0gn02AR/mNodj2UkSoxeVqCf1B6+uL94NEakrRauvOE/lD6EDhgzklqUBnGY378= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716627513; c=relaxed/simple; bh=sRCnudqnr8IJM/EqcbcY88JBahZ1TQrrny6xKyDJPU8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=iy9HBhMaXO4lMjxuqALPLqDu1c/dghUrFpAfCocE2QsAkivyWSq29nxrTHrBh/4vm5IMdvsczi4eU5YY/QrJ4IX4hGJRaRw23iCaM4LKem+lCAEHxeBGbFWaStxzuHr1LuSb2YA7L3Xb9TW48Re+cTHOf5Zn5p7a9iD1AyzyhfU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a5dcb5a0db4so897538366b.2 for ; Sat, 25 May 2024 01:58:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716627510; x=1717232310; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=xAeRS6cKagurEwcutgQgjxUBhVZiqB0qFt44WWWePl8=; b=ZDzEW6BIcOLPl9zufU4UfUz9ZHrk5RZeRyoZ39bexAlH3Kbxm/5S1/FjqWny8t5P8p xo53rSIHcS3AJdpzXo3JvXCvvbE/dq1o2sCAx5seU8p2i+dC7d3RQrNioSlDaVLn/LEa NgI6SKj8L50TGtGwtKmD9eUAj2ygp008bqwAhhAondqNh425oCKume/FTbAXaD8n6cDP /pyP451FthfQeW8SfpSQoOZsgUZBK115AAL+DG7UEgPYudcX1plXiOrfgoA6U5b57zvK nTooM0j59UlkaKkL6SbOkYGDMoMDVgWpxdYbMFm1pc9RrwNG0mg4lIrIE7UmGndJSLN5 +Xcw== X-Gm-Message-State: AOJu0YxlEuNPKegRRLQ7ad3l4LN/Wr91pnvx8HXOCF0oSk01ZeoO1un6 ppCoXbQojNJRXC0ncn6ZVqfqZJLJX3rYOeqvQf/GjXKKJGAgxF5edifwvxA1WPmU2OCWUb+w5tk = X-Google-Smtp-Source: AGHT+IEWDu4U/RWAwPuJI24tqX6Wf0UfOjpjq+mcE/mBkb0qQnD6ttzRs3lzNjs/YL0bGQQCANy8+A== X-Received: by 2002:a17:906:e0d3:b0:a59:c3d0:5507 with SMTP id a640c23a62f3a-a62641e0007mr320238766b.26.1716627509712; Sat, 25 May 2024 01:58:29 -0700 (PDT) Received: from lubuntu2 (ad96e1c12.dsl.de.colt.net. [217.110.28.18]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a62b5d80ff0sm30616366b.95.2024.05.25.01.58.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 01:58:29 -0700 (PDT) To: gdb@sourceware.org Subject: symbol files in python Date: Sat, 25 May 2024 10:58:28 +0200 Message-ID: <87ttimgte3.fsf@lubuntu2.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "Dmitry.Neverov via Gdb" Reply-To: "Dmitry.Neverov" Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" I'm trying to filter out uninitialized variables in a frame by checking their lines in python, something like this: sal = frame.find_sal() frame_line = sal.line frame_file = sal.symtab.filename block = frame.block() while block is not None and block.is_valid(): for sym in block: if sym.line >= frame_line: continue symtab = sym.symtab if symtab is None or symtab.filename != frame_file: continue # otherwise show symbol as a variable if block.function is not None: break block = block.superblock Is it correct to expect that symbols in blocks inside a function will have the same file as the function's frame? I've noticed that if I add a breakpoint in type::set_num_fields() (gdb/gdbtypes.h:1002), symtab.filename' for 'this' is 'gdb/mdebugread.c' and not 'gdb/gdbtypes.h'. Is it expected? -- Dmitry