mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 01:50:48 +00:00
guile: Add as_a_scm_t_subr
Building GDB in C++ mode on Fedora 20, the gdb/guile/ code shows ~280
errors like:
src/gdb/guile/guile.c:515:1: error: invalid conversion from ‘scm_unused_struct* (*)(SCM, SCM) {aka scm_unused_struct* (*)(scm_unused_struct*, scm_unused_struct*)}’ to ‘scm_t_subr {aka void*}’ [-fpermissive]
This commit fixes them all.
gdb/ChangeLog:
2015-09-07 Pedro Alves <palves@redhat.com>
* guile/guile-internal.h (as_a_scm_t_subr): New.
* guile/guile.c (misc_guile_functions): Use it.
* guile/scm-arch.c (arch_functions): Use it.
* guile/scm-block.c (block_functions, gdbscm_initialize_blocks):
Use it.
* guile/scm-breakpoint.c (breakpoint_functions): Use it.
* guile/scm-cmd.c (command_functions): Use it.
* guile/scm-disasm.c (disasm_functions): Use it.
* guile/scm-exception.c (exception_functions)
(private_exception_functions): Use it.
* guile/scm-frame.c (frame_functions)
* guile/scm-gsmob.c (gsmob_functions): Use it.
* guile/scm-iterator.c (iterator_functions): Use it.
* guile/scm-lazy-string.c (lazy_string_functions): Use it.
* guile/scm-math.c (math_functions): Use it.
* guile/scm-objfile.c (objfile_functions): Use it.
* guile/scm-param.c (parameter_functions): Use it.
* guile/scm-ports.c (port_functions, private_port_functions): Use
it.
* guile/scm-pretty-print.c (pretty_printer_functions): Use it.
* guile/scm-progspace.c (pspace_functions): Use it.
* guile/scm-string.c (string_functions): Use it.
* guile/scm-symbol.c (symbol_functions): Use it.
* guile/scm-symtab.c (symtab_functions): Use it.
* guile/scm-type.c (type_functions, gdbscm_initialize_types): Use
it.
* guile/scm-value.c (value_functions): Use it.
This commit is contained in:
@@ -716,73 +716,75 @@ static const scheme_integer_constant symbol_integer_constants[] =
|
||||
|
||||
static const scheme_function symbol_functions[] =
|
||||
{
|
||||
{ "symbol?", 1, 0, 0, gdbscm_symbol_p,
|
||||
{ "symbol?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_p),
|
||||
"\
|
||||
Return #t if the object is a <gdb:symbol> object." },
|
||||
|
||||
{ "symbol-valid?", 1, 0, 0, gdbscm_symbol_valid_p,
|
||||
{ "symbol-valid?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_valid_p),
|
||||
"\
|
||||
Return #t if object is a valid <gdb:symbol> object.\n\
|
||||
A valid symbol is a symbol that has not been freed.\n\
|
||||
Symbols are freed when the objfile they come from is freed." },
|
||||
|
||||
{ "symbol-type", 1, 0, 0, gdbscm_symbol_type,
|
||||
{ "symbol-type", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_type),
|
||||
"\
|
||||
Return the type of symbol." },
|
||||
|
||||
{ "symbol-symtab", 1, 0, 0, gdbscm_symbol_symtab,
|
||||
{ "symbol-symtab", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_symtab),
|
||||
"\
|
||||
Return the symbol table (<gdb:symtab>) containing symbol." },
|
||||
|
||||
{ "symbol-line", 1, 0, 0, gdbscm_symbol_line,
|
||||
{ "symbol-line", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_line),
|
||||
"\
|
||||
Return the line number at which the symbol was defined." },
|
||||
|
||||
{ "symbol-name", 1, 0, 0, gdbscm_symbol_name,
|
||||
{ "symbol-name", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_name),
|
||||
"\
|
||||
Return the name of the symbol as a string." },
|
||||
|
||||
{ "symbol-linkage-name", 1, 0, 0, gdbscm_symbol_linkage_name,
|
||||
{ "symbol-linkage-name", 1, 0, 0,
|
||||
as_a_scm_t_subr (gdbscm_symbol_linkage_name),
|
||||
"\
|
||||
Return the linkage name of the symbol as a string." },
|
||||
|
||||
{ "symbol-print-name", 1, 0, 0, gdbscm_symbol_print_name,
|
||||
{ "symbol-print-name", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_print_name),
|
||||
"\
|
||||
Return the print name of the symbol as a string.\n\
|
||||
This is either name or linkage-name, depending on whether the user\n\
|
||||
asked GDB to display demangled or mangled names." },
|
||||
|
||||
{ "symbol-addr-class", 1, 0, 0, gdbscm_symbol_addr_class,
|
||||
{ "symbol-addr-class", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_addr_class),
|
||||
"\
|
||||
Return the address class of the symbol." },
|
||||
|
||||
{ "symbol-needs-frame?", 1, 0, 0, gdbscm_symbol_needs_frame_p,
|
||||
{ "symbol-needs-frame?", 1, 0, 0,
|
||||
as_a_scm_t_subr (gdbscm_symbol_needs_frame_p),
|
||||
"\
|
||||
Return #t if the symbol needs a frame to compute its value." },
|
||||
|
||||
{ "symbol-argument?", 1, 0, 0, gdbscm_symbol_argument_p,
|
||||
{ "symbol-argument?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_argument_p),
|
||||
"\
|
||||
Return #t if the symbol is a function argument." },
|
||||
|
||||
{ "symbol-constant?", 1, 0, 0, gdbscm_symbol_constant_p,
|
||||
{ "symbol-constant?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_constant_p),
|
||||
"\
|
||||
Return #t if the symbol is a constant." },
|
||||
|
||||
{ "symbol-function?", 1, 0, 0, gdbscm_symbol_function_p,
|
||||
{ "symbol-function?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_function_p),
|
||||
"\
|
||||
Return #t if the symbol is a function." },
|
||||
|
||||
{ "symbol-variable?", 1, 0, 0, gdbscm_symbol_variable_p,
|
||||
{ "symbol-variable?", 1, 0, 0, as_a_scm_t_subr (gdbscm_symbol_variable_p),
|
||||
"\
|
||||
Return #t if the symbol is a variable." },
|
||||
|
||||
{ "symbol-value", 1, 0, 1, gdbscm_symbol_value,
|
||||
{ "symbol-value", 1, 0, 1, as_a_scm_t_subr (gdbscm_symbol_value),
|
||||
"\
|
||||
Return the value of the symbol.\n\
|
||||
\n\
|
||||
Arguments: <gdb:symbol> [#:frame frame]" },
|
||||
|
||||
{ "lookup-symbol", 1, 0, 1, gdbscm_lookup_symbol,
|
||||
{ "lookup-symbol", 1, 0, 1, as_a_scm_t_subr (gdbscm_lookup_symbol),
|
||||
"\
|
||||
Return (<gdb:symbol> field-of-this?) if found, otherwise #f.\n\
|
||||
\n\
|
||||
@@ -791,7 +793,8 @@ Return (<gdb:symbol> field-of-this?) if found, otherwise #f.\n\
|
||||
block: a <gdb:block> object\n\
|
||||
domain: a SYMBOL_*_DOMAIN value" },
|
||||
|
||||
{ "lookup-global-symbol", 1, 0, 1, gdbscm_lookup_global_symbol,
|
||||
{ "lookup-global-symbol", 1, 0, 1,
|
||||
as_a_scm_t_subr (gdbscm_lookup_global_symbol),
|
||||
"\
|
||||
Return <gdb:symbol> if found, otherwise #f.\n\
|
||||
\n\
|
||||
|
||||
Reference in New Issue
Block a user