From: Doug Evans <dje@gmail.com>
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 [thread overview]
Message-ID: <m3fvqf3unp.fsf@sspiff.sspiff.org> (raw)
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 <xdje42@gmail.com>
* 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 <http://www.gnu.org/licenses/>. */
+
+#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 */
next reply other threads:[~2013-11-29 18:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 19:59 Doug Evans [this message]
2013-12-02 15:19 ` Tom Tromey
2013-12-02 17:01 ` Doug Evans
2013-12-03 16:17 ` Doug Evans
2013-12-05 21:07 ` Tom Tromey
2013-12-07 20:56 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3fvqf3unp.fsf@sspiff.sspiff.org \
--to=dje@gmail.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox