aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/guile')
-rw-r--r--gdb/guile/guile-internal.h40
-rw-r--r--gdb/guile/scm-arch.c5
-rw-r--r--gdb/guile/scm-block.c8
-rw-r--r--gdb/guile/scm-cmd.c4
-rw-r--r--gdb/guile/scm-exception.c4
-rw-r--r--gdb/guile/scm-frame.c5
-rw-r--r--gdb/guile/scm-iterator.c5
-rw-r--r--gdb/guile/scm-lazy-string.c4
-rw-r--r--gdb/guile/scm-objfile.c5
-rw-r--r--gdb/guile/scm-param.c4
-rw-r--r--gdb/guile/scm-ports.c4
-rw-r--r--gdb/guile/scm-pretty-print.c8
-rw-r--r--gdb/guile/scm-progspace.c5
-rw-r--r--gdb/guile/scm-symbol.c4
-rw-r--r--gdb/guile/scm-symtab.c8
-rw-r--r--gdb/guile/scm-type.c9
-rw-r--r--gdb/guile/scm-value.c8
17 files changed, 62 insertions, 68 deletions
diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h
index bb2bc11..4dd7023 100644
--- a/gdb/guile/guile-internal.h
+++ b/gdb/guile/guile-internal.h
@@ -40,12 +40,12 @@ typedef int excp_matcher_func (SCM key);
/* Scheme variables to define during initialization. */
-typedef struct
+struct scheme_variable
{
const char *name;
SCM value;
const char *doc_string;
-} scheme_variable;
+};
/* End of scheme_variable table mark. */
@@ -89,7 +89,7 @@ as_a_scm_t_subr (SCM (*func) (SCM, SCM, SCM))
/* Scheme functions to define during initialization. */
-typedef struct
+struct scheme_function
{
const char *name;
int required;
@@ -97,7 +97,7 @@ typedef struct
int rest;
scm_t_subr func;
const char *doc_string;
-} scheme_function;
+};
/* End of scheme_function table mark. */
@@ -105,11 +105,11 @@ typedef struct
/* Useful for defining a set of constants. */
-typedef struct
+struct scheme_integer_constant
{
const char *name;
int value;
-} scheme_integer_constant;
+};
#define END_INTEGER_CONSTANTS { NULL, 0 }
@@ -239,20 +239,20 @@ extern int gdbscm_guile_version_is_at_least (int major, int minor, int micro);
#define GDB_SMOB_HEAD \
int empty_base_class;
-typedef struct
+struct gdb_smob
{
GDB_SMOB_HEAD
-} gdb_smob;
+};
-typedef struct _chained_gdb_smob
+struct chained_gdb_smob
{
GDB_SMOB_HEAD
- struct _chained_gdb_smob *prev;
- struct _chained_gdb_smob *next;
-} chained_gdb_smob;
+ chained_gdb_smob *prev;
+ chained_gdb_smob *next;
+};
-typedef struct _eqable_gdb_smob
+struct eqable_gdb_smob
{
GDB_SMOB_HEAD
@@ -267,7 +267,7 @@ typedef struct _eqable_gdb_smob
we need to invalidate the objects: we can do that using the same hashtab
used to record the smob for eq-ability. */
SCM containing_scm;
-} eqable_gdb_smob;
+};
#undef GDB_SMOB_HEAD
@@ -416,7 +416,7 @@ extern void gdbscm_enter_repl (void);
/* scm-arch.c */
-typedef struct _arch_smob arch_smob;
+struct arch_smob;
extern struct gdbarch *arscm_get_gdbarch (arch_smob *a_smob);
@@ -447,7 +447,7 @@ extern char *gdbscm_canonicalize_command_name (const char *name,
/* scm-frame.c */
-typedef struct _frame_smob frame_smob;
+struct frame_smob;
extern int frscm_is_frame (SCM scm);
@@ -458,7 +458,7 @@ extern struct frame_info *frscm_frame_smob_to_frame (frame_smob *);
/* scm-iterator.c */
-typedef struct _iterator_smob iterator_smob;
+struct iterator_smob;
extern SCM itscm_iterator_smob_object (iterator_smob *i_smob);
@@ -500,7 +500,7 @@ extern void lsscm_val_print_lazy_string
/* scm-objfile.c */
-typedef struct _objfile_smob objfile_smob;
+struct objfile_smob;
extern SCM ofscm_objfile_smob_pretty_printers (objfile_smob *o_smob);
@@ -510,7 +510,7 @@ extern SCM ofscm_scm_from_objfile (struct objfile *objfile);
/* scm-progspace.c */
-typedef struct _pspace_smob pspace_smob;
+struct pspace_smob;
extern SCM psscm_pspace_smob_pretty_printers (const pspace_smob *);
@@ -557,7 +557,7 @@ extern SCM stscm_scm_from_sal (struct symtab_and_line sal);
/* scm-type.c */
-typedef struct _type_smob type_smob;
+struct type_smob;
extern int tyscm_is_type (SCM scm);
diff --git a/gdb/guile/scm-arch.c b/gdb/guile/scm-arch.c
index 953cb22..ce9d9f1 100644
--- a/gdb/guile/scm-arch.c
+++ b/gdb/guile/scm-arch.c
@@ -26,10 +26,9 @@
#include "arch-utils.h"
#include "guile-internal.h"
-/* The <gdb:arch> smob.
- The typedef for this struct is in guile-internal.h. */
+/* The <gdb:arch> smob. */
-struct _arch_smob
+struct arch_smob
{
/* This always appears first. */
gdb_smob base;
diff --git a/gdb/guile/scm-block.c b/gdb/guile/scm-block.c
index 813c6c1..1a898fa 100644
--- a/gdb/guile/scm-block.c
+++ b/gdb/guile/scm-block.c
@@ -30,7 +30,7 @@
/* A smob describing a gdb block. */
-typedef struct _block_smob
+struct block_smob
{
/* This always appears first.
We want blocks to be eq?-able. And we need to be able to invalidate
@@ -44,7 +44,7 @@ typedef struct _block_smob
between a block and an object file. When a block is created also
store a pointer to the object file for later use. */
struct objfile *objfile;
-} block_smob;
+};
/* To iterate over block symbols from Scheme we need to store
struct block_iterator somewhere. This is stored in the "progress" field
@@ -54,7 +54,7 @@ typedef struct _block_smob
Remember: While iterating over block symbols, you must continually check
whether the block is still valid. */
-typedef struct
+struct block_syms_progress_smob
{
/* This always appears first. */
gdb_smob base;
@@ -64,7 +64,7 @@ typedef struct
/* Has the iterator been initialized flag. */
int initialized_p;
-} block_syms_progress_smob;
+};
static const char block_smob_name[] = "gdb:block";
static const char block_syms_progress_smob_name[] = "gdb:block-symbols-iterator";
diff --git a/gdb/guile/scm-cmd.c b/gdb/guile/scm-cmd.c
index f4db411..bf079a2 100644
--- a/gdb/guile/scm-cmd.c
+++ b/gdb/guile/scm-cmd.c
@@ -37,7 +37,7 @@
any side-effects. This means that the smob needs to store everything
that was passed to make-command. */
-typedef struct _command_smob
+struct command_smob
{
/* This always appears first. */
gdb_smob base;
@@ -85,7 +85,7 @@ typedef struct _command_smob
the object since a reference to it comes from non-gc-managed space
(the command context pointer). */
SCM containing_scm;
-} command_smob;
+};
static const char command_smob_name[] = "gdb:command";
diff --git a/gdb/guile/scm-exception.c b/gdb/guile/scm-exception.c
index 96ed60a..a6c6a5e 100644
--- a/gdb/guile/scm-exception.c
+++ b/gdb/guile/scm-exception.c
@@ -37,7 +37,7 @@
One important invariant is that <gdb:exception> smobs are never a valid
result of a function, other than to signify an exception occurred. */
-typedef struct
+struct exception_smob
{
/* This always appears first. */
gdb_smob base;
@@ -45,7 +45,7 @@ typedef struct
/* The key and args parameters to "throw". */
SCM key;
SCM args;
-} exception_smob;
+};
static const char exception_smob_name[] = "gdb:exception";
diff --git a/gdb/guile/scm-frame.c b/gdb/guile/scm-frame.c
index 211c663..f099689 100644
--- a/gdb/guile/scm-frame.c
+++ b/gdb/guile/scm-frame.c
@@ -32,10 +32,9 @@
#include "value.h"
#include "guile-internal.h"
-/* The <gdb:frame> smob.
- The typedef for this struct is in guile-internal.h. */
+/* The <gdb:frame> smob. */
-struct _frame_smob
+struct frame_smob
{
/* This always appears first. */
eqable_gdb_smob base;
diff --git a/gdb/guile/scm-iterator.c b/gdb/guile/scm-iterator.c
index 36ab5c0..71f5eea 100644
--- a/gdb/guile/scm-iterator.c
+++ b/gdb/guile/scm-iterator.c
@@ -55,10 +55,9 @@
/* A smob for iterating over something.
Typically this is used when computing a list of everything is
- too expensive.
- The typedef for this struct is in guile-internal.h. */
+ too expensive. */
-struct _iterator_smob
+struct iterator_smob
{
/* This always appears first. */
gdb_smob base;
diff --git a/gdb/guile/scm-lazy-string.c b/gdb/guile/scm-lazy-string.c
index 0df1b3a..978f695 100644
--- a/gdb/guile/scm-lazy-string.c
+++ b/gdb/guile/scm-lazy-string.c
@@ -29,7 +29,7 @@
/* The <gdb:lazy-string> smob. */
-typedef struct
+struct lazy_string_smob
{
/* This always appears first. */
gdb_smob base;
@@ -58,7 +58,7 @@ typedef struct
This is recorded as an SCM object so that we take advantage of support for
preserving the type should its owning objfile go away. */
SCM type;
-} lazy_string_smob;
+};
static const char lazy_string_smob_name[] = "gdb:lazy-string";
diff --git a/gdb/guile/scm-objfile.c b/gdb/guile/scm-objfile.c
index b1ff402..77b1cd3 100644
--- a/gdb/guile/scm-objfile.c
+++ b/gdb/guile/scm-objfile.c
@@ -25,10 +25,9 @@
#include "language.h"
#include "guile-internal.h"
-/* The <gdb:objfile> smob.
- The typedef for this struct is in guile-internal.h. */
+/* The <gdb:objfile> smob. */
-struct _objfile_smob
+struct objfile_smob
{
/* This always appears first. */
gdb_smob base;
diff --git a/gdb/guile/scm-param.c b/gdb/guile/scm-param.c
index 62e2108..19ca45e 100644
--- a/gdb/guile/scm-param.c
+++ b/gdb/guile/scm-param.c
@@ -62,7 +62,7 @@ union pascm_variable
N.B. There is no free function for this smob.
All objects pointed to by this smob must live in GC space. */
-typedef struct _param_smob
+struct param_smob
{
/* This always appears first. */
gdb_smob base;
@@ -112,7 +112,7 @@ typedef struct _param_smob
protect/unprotect the object since a reference to it comes from
non-gc-managed space (the command context pointer). */
SCM containing_scm;
-} param_smob;
+};
static const char param_smob_name[] = "gdb:parameter";
diff --git a/gdb/guile/scm-ports.c b/gdb/guile/scm-ports.c
index 66efdf4..f071c2f 100644
--- a/gdb/guile/scm-ports.c
+++ b/gdb/guile/scm-ports.c
@@ -59,7 +59,7 @@ private:
/* Data for a memory port. */
-typedef struct
+struct ioscm_memory_port
{
/* Bounds of memory range this port is allowed to access: [start, end).
This means that 0xff..ff is not accessible. I can live with that. */
@@ -80,7 +80,7 @@ typedef struct
the user to specify these values to help get something similar. */
unsigned read_buf_size, write_buf_size;
#endif
-} ioscm_memory_port;
+};
/* Copies of the original system input/output/error ports.
These are recorded for debugging purposes. */
diff --git a/gdb/guile/scm-pretty-print.c b/gdb/guile/scm-pretty-print.c
index df09dae..0bbcc4d 100644
--- a/gdb/guile/scm-pretty-print.c
+++ b/gdb/guile/scm-pretty-print.c
@@ -59,7 +59,7 @@ enum display_hint
/* The <gdb:pretty-printer> smob. */
-typedef struct
+struct pretty_printer_smob
{
/* This must appear first. */
gdb_smob base;
@@ -77,11 +77,11 @@ typedef struct
SCM lookup;
/* Note: Attaching subprinters to this smob is left to Scheme. */
-} pretty_printer_smob;
+};
/* The <gdb:pretty-printer-worker> smob. */
-typedef struct
+struct pretty_printer_worker_smob
{
/* This must appear first. */
gdb_smob base;
@@ -99,7 +99,7 @@ typedef struct
The iterator returns a pair for each iteration: (name . value),
where "value" can have the same types as to_string. */
SCM children;
-} pretty_printer_worker_smob;
+};
static const char pretty_printer_smob_name[] =
"gdb:pretty-printer";
diff --git a/gdb/guile/scm-progspace.c b/gdb/guile/scm-progspace.c
index 49c3e36..9f93a98 100644
--- a/gdb/guile/scm-progspace.c
+++ b/gdb/guile/scm-progspace.c
@@ -28,10 +28,9 @@
/* NOTE: Python exports the name "Progspace", so we export "progspace".
Internally we shorten that to "pspace". */
-/* The <gdb:progspace> smob.
- The typedef for this struct is in guile-internal.h. */
+/* The <gdb:progspace> smob. */
-struct _pspace_smob
+struct pspace_smob
{
/* This always appears first. */
gdb_smob base;
diff --git a/gdb/guile/scm-symbol.c b/gdb/guile/scm-symbol.c
index 8bad7e6..9810ec9 100644
--- a/gdb/guile/scm-symbol.c
+++ b/gdb/guile/scm-symbol.c
@@ -30,14 +30,14 @@
/* The <gdb:symbol> smob. */
-typedef struct
+struct symbol_smob
{
/* This always appears first. */
eqable_gdb_smob base;
/* The GDB symbol structure this smob is wrapping. */
struct symbol *symbol;
-} symbol_smob;
+};
static const char symbol_smob_name[] = "gdb:symbol";
diff --git a/gdb/guile/scm-symtab.c b/gdb/guile/scm-symtab.c
index 0efd0aa..eb83a16 100644
--- a/gdb/guile/scm-symtab.c
+++ b/gdb/guile/scm-symtab.c
@@ -29,7 +29,7 @@
/* A <gdb:symtab> smob. */
-typedef struct
+struct symtab_smob
{
/* This always appears first.
eqable_gdb_smob is used so that symtabs are eq?-able.
@@ -42,7 +42,7 @@ typedef struct
If this is NULL the symtab is invalid. This can happen when the
underlying objfile is freed. */
struct symtab *symtab;
-} symtab_smob;
+};
/* A <gdb:sal> smob.
A smob describing a gdb symtab-and-line object.
@@ -50,7 +50,7 @@ typedef struct
the validity of symtab_scm.
TODO: Sals are not eq?-able at the moment, or even comparable. */
-typedef struct
+struct sal_smob
{
/* This always appears first. */
gdb_smob base;
@@ -67,7 +67,7 @@ typedef struct
this pointer will not be updated. Use symtab_scm instead to determine
if this sal is valid. */
struct symtab_and_line sal;
-} sal_smob;
+};
static const char symtab_smob_name[] = "gdb:symtab";
/* "symtab-and-line" is pretty long, and "sal" is short and unique. */
diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c
index 8fc9629..a2640f2 100644
--- a/gdb/guile/scm-type.c
+++ b/gdb/guile/scm-type.c
@@ -34,10 +34,9 @@
/* The <gdb:type> smob.
The type is chained with all types associated with its objfile, if any.
This lets us copy the underlying struct type when the objfile is
- deleted.
- The typedef for this struct is in guile-internal.h. */
+ deleted. */
-struct _type_smob
+struct type_smob
{
/* This always appears first.
eqable_gdb_smob is used so that types are eq?-able.
@@ -52,7 +51,7 @@ struct _type_smob
/* A field smob. */
-typedef struct
+struct field_smob
{
/* This always appears first. */
gdb_smob base;
@@ -62,7 +61,7 @@ typedef struct
/* The field number in TYPE_SCM. */
int field_num;
-} field_smob;
+};
static const char type_smob_name[] = "gdb:type";
static const char field_smob_name[] = "gdb:field";
diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c
index 5ba1f2c..e1b0020 100644
--- a/gdb/guile/scm-value.c
+++ b/gdb/guile/scm-value.c
@@ -34,7 +34,7 @@
/* The <gdb:value> smob. */
-typedef struct _value_smob
+struct value_smob
{
/* This always appears first. */
gdb_smob base;
@@ -42,8 +42,8 @@ typedef struct _value_smob
/* Doubly linked list of values in values_in_scheme.
IWBN to use a chained_gdb_smob instead, which is doable, it just requires
a bit more casting than normal. */
- struct _value_smob *next;
- struct _value_smob *prev;
+ value_smob *next;
+ value_smob *prev;
struct value *value;
@@ -55,7 +55,7 @@ typedef struct _value_smob
SCM address;
SCM type;
SCM dynamic_type;
-} value_smob;
+};
static const char value_smob_name[] = "gdb:value";