GDB (xrefs)

Classes | Functions | Variables
scm-objfile.c File Reference
`#include "defs.h"`
`#include "objfiles.h"`
`#include "language.h"`
`#include "guile-internal.h"`

Go to the source code of this file.

## Classes
struct | _objfile_smob

## Functions
SCM | ofscm_objfile_smob_pretty_printers (objfile_smob *o_smob)
static int | ofscm_print_objfile_smob (SCM self, SCM port, scm_print_state *pstate)
static SCM | ofscm_make_objfile_smob (void)
static void | ofscm_release_objfile (objfile_smob *o_smob)
static void | ofscm_handle_objfile_deleted (struct objfile *objfile, void *datum)
static int | ofscm_is_objfile (SCM scm)
static SCM | gdbscm_objfile_p (SCM scm)
objfile_smob * | ofscm_objfile_smob_from_objfile (struct objfile *objfile)
SCM | ofscm_scm_from_objfile (struct objfile *objfile)
static SCM | ofscm_get_objfile_arg_unsafe (SCM self, int arg_pos, const char *func_name)
static objfile_smob * | ofscm_get_objfile_smob_arg_unsafe (SCM self, int arg_pos, const char *func_name)
static int | ofscm_is_valid (objfile_smob *o_smob)
static objfile_smob * | ofscm_get_valid_objfile_smob_arg_unsafe (SCM self, int arg_pos, const char *func_name)
static SCM | gdbscm_objfile_valid_p (SCM self)
static SCM | gdbscm_objfile_filename (SCM self)
static SCM | gdbscm_objfile_progspace (SCM self)
static SCM | gdbscm_objfile_pretty_printers (SCM self)
static SCM | gdbscm_set_objfile_pretty_printers_x (SCM self, SCM printers)
void | gdbscm_source_objfile_script (const struct extension_language_defn *extlang, struct objfile *objfile, FILE *file, const char *filename)
void | gdbscm_execute_objfile_script (const struct extension_language_defn *extlang, struct objfile *objfile, const char *name, const char *script)
static SCM | gdbscm_get_current_objfile (void)
static SCM | gdbscm_objfiles (void)
void | gdbscm_initialize_objfiles (void)

## Variables
static const char | objfile_smob_name [] = "gdb:objfile"
static scm_t_bits | objfile_smob_tag
static const struct objfile_data * | ofscm_objfile_data_key
static struct objfile * | ofscm_current_objfile
static const scheme_function | objfile_functions []

## Function Documentation

## ◆ gdbscm_execute_objfile_script()

void gdbscm_execute_objfile_script | ( | const struct extension_language_defn * | extlang,
|  | struct objfile * | objfile,
|  | const char * | name,
|  | const char * | script
| ) |  |

Definition at line 335 of file scm-objfile.c.

References fprintf_filtered(), gdb_stderr, gdbscm_safe_eval_string(), objfile::objfile(), ofscm_current_objfile, and xfree().

## ◆ gdbscm_get_current_objfile()

static SCM gdbscm_get_current_objfile | ( | void |  | ) |
| static

Definition at line 359 of file scm-objfile.c.

References ofscm_current_objfile, and ofscm_scm_from_objfile().

## ◆ gdbscm_initialize_objfiles()

void gdbscm_initialize_objfiles | ( | void |  | ) |

Definition at line 430 of file scm-objfile.c.

References gdbscm_define_functions(), gdbscm_make_smob_type(), objfile_functions, objfile_smob_name, objfile_smob_tag, ofscm_handle_objfile_deleted(), ofscm_objfile_data_key, and ofscm_print_objfile_smob().

## ◆ gdbscm_objfile_filename()

static SCM gdbscm_objfile_filename | ( | SCM | self | ) |
| static

Definition at line 247 of file scm-objfile.c.

References FUNC_NAME, gdbscm_scm_from_c_string(), _objfile_smob::objfile, objfile_name(), and ofscm_get_valid_objfile_smob_arg_unsafe().

## ◆ gdbscm_objfile_p()

static SCM gdbscm_objfile_p | ( | SCM | scm | ) |
| static

Definition at line 137 of file scm-objfile.c.

References ofscm_is_objfile().

## ◆ gdbscm_objfile_pretty_printers()

static SCM gdbscm_objfile_pretty_printers | ( | SCM | self | ) |
| static

Definition at line 272 of file scm-objfile.c.

References FUNC_NAME, ofscm_get_objfile_smob_arg_unsafe(), and _objfile_smob::pretty_printers.

## ◆ gdbscm_objfile_progspace()

static SCM gdbscm_objfile_progspace | ( | SCM | self | ) |
| static

Definition at line 260 of file scm-objfile.c.

References FUNC_NAME, _objfile_smob::objfile, ofscm_get_valid_objfile_smob_arg_unsafe(), objfile::pspace, and psscm_scm_from_pspace().

## ◆ gdbscm_objfile_valid_p()

static SCM gdbscm_objfile_valid_p | ( | SCM | self | ) |
| static

Definition at line 234 of file scm-objfile.c.

References FUNC_NAME, _objfile_smob::objfile, and ofscm_get_objfile_smob_arg_unsafe().

## ◆ gdbscm_objfiles()

static SCM gdbscm_objfiles | ( | void |  | ) |
| static

Definition at line 371 of file scm-objfile.c.

References ALL_OBJFILES, and ofscm_scm_from_objfile().

## ◆ gdbscm_set_objfile_pretty_printers_x()

static SCM gdbscm_set_objfile_pretty_printers_x | ( | SCM | self,
|  | SCM | printers
| ) |  |
| static

Definition at line 284 of file scm-objfile.c.

References _, FUNC_NAME, gdbscm_is_true, ofscm_get_objfile_smob_arg_unsafe(), and _objfile_smob::pretty_printers.

## ◆ gdbscm_source_objfile_script()

void gdbscm_source_objfile_script | ( | const struct extension_language_defn * | extlang,
|  | struct objfile * | objfile,
|  | FILE * | file,
|  | const char * | filename
| ) |  |

Definition at line 310 of file scm-objfile.c.

References fprintf_filtered(), gdb_stderr, gdbscm_safe_source_script(), objfile::objfile(), ofscm_current_objfile, and xfree().

## ◆ ofscm_get_objfile_arg_unsafe()

static SCM ofscm_get_objfile_arg_unsafe | ( | SCM | self,
|  | int | arg_pos,
|  | const char * | func_name
| ) |  |
| static

Definition at line 180 of file scm-objfile.c.

References objfile_smob_name, and ofscm_is_objfile().

Referenced by ofscm_get_objfile_smob_arg_unsafe().

## ◆ ofscm_get_objfile_smob_arg_unsafe()

static objfile_smob* ofscm_get_objfile_smob_arg_unsafe | ( | SCM | self,
|  | int | arg_pos,
|  | const char * | func_name
| ) |  |
| static

Definition at line 192 of file scm-objfile.c.

References ofscm_get_objfile_arg_unsafe().

Referenced by gdbscm_objfile_pretty_printers(), gdbscm_objfile_valid_p(), gdbscm_set_objfile_pretty_printers_x(), and ofscm_get_valid_objfile_smob_arg_unsafe().

## ◆ ofscm_get_valid_objfile_smob_arg_unsafe()

static objfile_smob* ofscm_get_valid_objfile_smob_arg_unsafe | ( | SCM | self,
|  | int | arg_pos,
|  | const char * | func_name
| ) |  |
| static

Definition at line 213 of file scm-objfile.c.

References _, gdbscm_invalid_object_error(), ofscm_get_objfile_smob_arg_unsafe(), and ofscm_is_valid().

Referenced by gdbscm_objfile_filename(), and gdbscm_objfile_progspace().

## ◆ ofscm_handle_objfile_deleted()

static void ofscm_handle_objfile_deleted | ( | struct objfile * | objfile,
|  | void * | datum
| ) |  |
| static

Definition at line 117 of file scm-objfile.c.

References gdb_assert, _objfile_smob::objfile, and ofscm_release_objfile().

Referenced by gdbscm_initialize_objfiles().

## ◆ ofscm_is_objfile()

static int ofscm_is_objfile | ( | SCM | scm | ) |
| static

Definition at line 129 of file scm-objfile.c.

References objfile_smob_tag.

Referenced by gdbscm_objfile_p(), and ofscm_get_objfile_arg_unsafe().

## ◆ ofscm_is_valid()

static int ofscm_is_valid | ( | objfile_smob * | o_smob | ) |
| static

Definition at line 204 of file scm-objfile.c.

References _objfile_smob::objfile.

Referenced by ofscm_get_valid_objfile_smob_arg_unsafe().

## ◆ ofscm_make_objfile_smob()

static SCM ofscm_make_objfile_smob | ( | void |  | ) |
| static

Definition at line 90 of file scm-objfile.c.

References gdbscm_init_gsmob(), _objfile_smob::objfile, objfile_smob_name, objfile_smob_tag, _objfile_smob::pretty_printers, and scm_new_smob().

Referenced by ofscm_objfile_smob_from_objfile().

## ◆ ofscm_objfile_smob_from_objfile()

objfile_smob* ofscm_objfile_smob_from_objfile | ( | struct objfile * | objfile | ) |

Definition at line 147 of file scm-objfile.c.

References _objfile_smob::containing_scm, _objfile_smob::objfile, ofscm_make_objfile_smob(), and ofscm_objfile_data_key.

Referenced by ofscm_scm_from_objfile(), and ppscm_find_pretty_printer_from_objfiles().

## ◆ ofscm_objfile_smob_pretty_printers()

SCM ofscm_objfile_smob_pretty_printers | ( | objfile_smob * | o_smob | ) |

Definition at line 58 of file scm-objfile.c.

References _objfile_smob::pretty_printers.

Referenced by ppscm_find_pretty_printer_from_objfiles().

## ◆ ofscm_print_objfile_smob()

static int ofscm_print_objfile_smob | ( | SCM | self,
|  | SCM | port,
|  | scm_print_state * | pstate
| ) |  |
| static

Definition at line 68 of file scm-objfile.c.

References gdbscm_printf(), _objfile_smob::objfile, objfile_name(), and objfile_smob_name.

Referenced by gdbscm_initialize_objfiles().

## ◆ ofscm_release_objfile()

static void ofscm_release_objfile | ( | objfile_smob * | o_smob | ) |
| static

Definition at line 108 of file scm-objfile.c.

References _objfile_smob::containing_scm, and _objfile_smob::objfile.

Referenced by ofscm_handle_objfile_deleted().

## ◆ ofscm_scm_from_objfile()

SCM ofscm_scm_from_objfile | ( | struct objfile * | objfile | ) |

Definition at line 169 of file scm-objfile.c.

References _objfile_smob::containing_scm, and ofscm_objfile_smob_from_objfile().

Referenced by gdbscm_get_current_objfile(), gdbscm_objfiles(), gdbscm_progspace_objfiles(), and gdbscm_symtab_objfile().

## Variable Documentation

## ◆ objfile_functions

const scheme_function objfile_functions[]
| static

Definition at line 390 of file scm-objfile.c.

Referenced by gdbscm_initialize_objfiles().

## ◆ objfile_smob_name

const char objfile_smob_name[] = "gdb:objfile"
| static

Definition at line 48 of file scm-objfile.c.

Referenced by gdbscm_initialize_objfiles(), ofscm_get_objfile_arg_unsafe(), ofscm_make_objfile_smob(), and ofscm_print_objfile_smob().

## ◆ objfile_smob_tag

scm_t_bits objfile_smob_tag
| static

Definition at line 51 of file scm-objfile.c.

Referenced by gdbscm_initialize_objfiles(), ofscm_is_objfile(), and ofscm_make_objfile_smob().

## ◆ ofscm_current_objfile

struct objfile* ofscm_current_objfile
| static

Definition at line 301 of file scm-objfile.c.

Referenced by gdbscm_execute_objfile_script(), gdbscm_get_current_objfile(), and gdbscm_source_objfile_script().

## ◆ ofscm_objfile_data_key

const struct objfile_data* ofscm_objfile_data_key
| static

Definition at line 53 of file scm-objfile.c.

Referenced by gdbscm_initialize_objfiles(), and ofscm_objfile_smob_from_objfile().