From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23699 invoked by alias); 29 Nov 2013 18:55:40 -0000 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 Received: (qmail 23674 invoked by uid 89); 29 Nov 2013 18:55:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=BAYES_50,FREEMAIL_FROM,RDNS_NONE,SPF_SOFTFAIL,URIBL_BLOCKED autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: seba.sebabeach.org Received: from Unknown (HELO seba.sebabeach.org) (173.13.178.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 29 Nov 2013 18:55:38 +0000 Received: from sspiff.sspiff.org (localhost [127.0.0.1]) by seba.sebabeach.org (8.14.7/8.14.7) with ESMTP id rATIt6Yc030740; Fri, 29 Nov 2013 10:55:06 -0800 Received: (from dje@localhost) by sspiff.sspiff.org (8.14.7/8.14.7/Submit) id rATIt62P030739; Fri, 29 Nov 2013 10:55:06 -0800 From: Doug Evans To: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [PATCH] include/gdb/section-scripts.h: New file. Date: Fri, 29 Nov 2013 19:59:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-11/txt/msg00941.txt.bz2 Hi. This patch creates a file to use when adding values to .debug_gdb_scripts. I plan to check it in if there are no objections. If one wants to add this to the gcc tree, that's fine by me, I'll resubmit to gcc-patches. I don't see a need to at the moment. Not everything in include/ is in the gcc tree, so I'm just going with the flow. OTOH, I can see a use for having this in the gcc tree: Some of its libraries may wish to use this. 2013-11-29 Doug Evans * section-scripts.h: New file. --- /dev/null 2013-11-10 10:37:43.054763239 -0800 +++ section-scripts.h 2013-11-29 10:51:05.693381759 -0800 @@ -0,0 +1,46 @@ +/* Definition of kinds of records in section .debug_gdb_scripts. + + Copyright (C) 2013 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_SECTION_SCRIPTS_H +#define GDB_SECTION_SCRIPTS_H + +/* Each entry in section .debug_gdb_scripts begins with a byte that is used to + identify the entry. This byte is to use as we choose. + 0 is reserved so that it is never used (to catch errors). + It is recommended to avoid ASCII values 32-127 to help catch (most) cases + of forgetting to include this byte. + Other unused values needn't specify different scripting languages, + but we have no need for anything else at the moment. + + Future extension: Include the contents of the script in the section. + + These values are defined as macros so that they can be used in embedded + asms and assembler source files. */ + +/* Reserved. */ +#define SECTION_SCRIPT_ID_NEVER_USE 0 + +/* The record is a nul-terminated file name to load as a python file. */ +#define SECTION_SCRIPT_ID_PYTHON_FILE 1 + +/* Native GDB scripts are not currently supported in .debug_gdb_scripts, + but we reserve a value for it. */ +/*#define SECTION_SCRIPT_ID_GDB_FILE 2*/ + +#endif /* GDB_SECTION_SCRIPTS_H */