From patchwork Thu Aug 22 13:30:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 96310 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 633283875409 for ; Thu, 22 Aug 2024 13:30:09 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 81AF03860778 for ; Thu, 22 Aug 2024 13:29:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 81AF03860778 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 81AF03860778 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724333379; cv=none; b=blmP++mfS/eLAwihOlxR2gA9K/qqN3qQNzmtVOHTmzNanIZWLXYnrV9Vudp5pjFornxE3d+JHZ6F/8rrOHnQ/20fVwM1wljzMwlpbZqnqpGxT1XGGUGBuT2M95OuIvp+AvA9NkqIs9XxJQj1+L2iaQCwqgCt8QJiRxAMseukECo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724333379; c=relaxed/simple; bh=MHn7ds3X5xPBEvOULffUsMydfga/JMBWY+LEuLjjwlQ=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=HqmMOzZ6yrBIfSDMvd/kk+eaKv0hcrOFdAFPFoftDdLB5Y8kRhWO4V6B5vmKIZq6EsSUzZ+W2QY6/rwcilEBUKbiBC5Sa5KAfL5BSMcU0zDwkH7GKZ+XE8/bOePsZ9Yv9xv34Cu0/xHjoAtcDt0dfDUgC4TQi8bEk6uW76szQ3k= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3B3AD201D0 for ; Thu, 22 Aug 2024 13:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724333376; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A4OUG5K+BKvdbp1LRoGmtOhglahqwtrfo7n5F5icvP4=; b=EXV4rzT8u3H4oH6Kh+K/H0tM4ewijyjoeElUUN7BQFrPalEwx80ZHOFz9kincesYXGR+i6 TQ8XA4IfeaLT9YIQP1PSm1L5Q8C4VdFinAtzEFpEa4u9aPGKZE97FFWPckrcBpLpNmK2eG qO9uz2zhV4tkXGPae9txr5i9olwAyow= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724333376; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A4OUG5K+BKvdbp1LRoGmtOhglahqwtrfo7n5F5icvP4=; b=morYeOKf23vX89vL4q4vu9bO6FWAooIlAUnKfCcZ+QyHetTb0GxZ+WA9dpOoV4ACIH8n9+ 2+n/oSgiL7imfhCg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=EXV4rzT8; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=morYeOKf DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724333376; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A4OUG5K+BKvdbp1LRoGmtOhglahqwtrfo7n5F5icvP4=; b=EXV4rzT8u3H4oH6Kh+K/H0tM4ewijyjoeElUUN7BQFrPalEwx80ZHOFz9kincesYXGR+i6 TQ8XA4IfeaLT9YIQP1PSm1L5Q8C4VdFinAtzEFpEa4u9aPGKZE97FFWPckrcBpLpNmK2eG qO9uz2zhV4tkXGPae9txr5i9olwAyow= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724333376; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A4OUG5K+BKvdbp1LRoGmtOhglahqwtrfo7n5F5icvP4=; b=morYeOKf23vX89vL4q4vu9bO6FWAooIlAUnKfCcZ+QyHetTb0GxZ+WA9dpOoV4ACIH8n9+ 2+n/oSgiL7imfhCg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1C75A13ABC for ; Thu, 22 Aug 2024 13:29:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id qKS8BUA9x2b/TQAAD6G6ig (envelope-from ) for ; Thu, 22 Aug 2024 13:29:36 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 2/4] [gdb/symtab] Add gdb/dwarf2/error.h Date: Thu, 22 Aug 2024 15:30:27 +0200 Message-Id: <20240822133029.11921-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240822133029.11921-1-tdevries@suse.de> References: <20240822133029.11921-1-tdevries@suse.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 3B3AD201D0 X-Spam-Level: X-Spamd-Result: default: False [-4.09 / 50.00]; BAYES_HAM(-2.08)[95.53%]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,gnu.org:url,suse.de:dkim,suse.de:mid]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_TLS_ALL(0.00)[]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from,2a07:de40:b281:106:10:150:64:167:received]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -4.09 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org Add a new header file gdb/dwarf2/error.h, containing macros: - DWARF_ERROR, and - DWARF_ERROR_PREFIX. The DWARF_ERROR_PREFIX is to be used in dwarf errors in a follow-up patch. No functional changes. Tested on x86_64-linux. --- gdb/dwarf2/error.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 gdb/dwarf2/error.h diff --git a/gdb/dwarf2/error.h b/gdb/dwarf2/error.h new file mode 100644 index 00000000000..33146240aba --- /dev/null +++ b/gdb/dwarf2/error.h @@ -0,0 +1,29 @@ +/* DWARF error handling utilities. + + Copyright (C) 2024 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef GDB_DWARF2_ERROR_H +#define GDB_DWARF2_ERROR_H + +/* Canonical capitalization of "dwarf error". */ +#define DWARF_ERROR "Dwarf Error" + +/* Prefix to be used in dwarf errors. */ +#define DWARF_ERROR_PREFIX DWARF_ERROR ": " + +#endif /* GDB_DWARF2_ERROR_H */