GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Functions | Variables
scm-disasm.c File Reference
#include "defs.h"
#include "arch-utils.h"
#include "disasm.h"
#include "dis-asm.h"
#include "gdbarch.h"
#include "gdbcore.h"
#include "guile-internal.h"

Go to the source code of this file.

Classes

class  gdbscm_disassembler
 
struct  gdbscm_disasm_read_data
 

Functions

static SCM dascm_make_insn (CORE_ADDR pc, const char *assembly, int insn_len)
 
static const char * gdbscm_disasm_read_memory_worker (void *datap)
 
static int gdbscm_disasm_read_memory (bfd_vma memaddr, bfd_byte *myaddr, unsigned int length, struct disassemble_info *dinfo) noexcept
 
static int gdbscm_print_insn_from_port (struct gdbarch *gdbarch, SCM port, ULONGEST offset, CORE_ADDR memaddr, string_file *stream, int *branch_delay_insns)
 
static SCM gdbscm_arch_disassemble (SCM self, SCM start_scm, SCM rest)
 
void gdbscm_initialize_disasm (void)
 

Variables

static SCM port_keyword
 
static SCM offset_keyword
 
static SCM size_keyword
 
static SCM count_keyword
 
static SCM address_symbol
 
static SCM asm_symbol
 
static SCM length_symbol
 
static const scheme_function disasm_functions []
 

Function Documentation

◆ dascm_make_insn()

static SCM dascm_make_insn ( CORE_ADDR pc,
const char * assembly,
int insn_len )
static

◆ gdbscm_arch_disassemble()

static SCM gdbscm_arch_disassemble ( SCM self,
SCM start_scm,
SCM rest )
static

◆ gdbscm_disasm_read_memory()

static int gdbscm_disasm_read_memory ( bfd_vma memaddr,
bfd_byte * myaddr,
unsigned int length,
struct disassemble_info * dinfo )
staticnoexcept

◆ gdbscm_disasm_read_memory_worker()

static const char * gdbscm_disasm_read_memory_worker ( void * datap)
static

◆ gdbscm_initialize_disasm()

void gdbscm_initialize_disasm ( void )

◆ gdbscm_print_insn_from_port()

static int gdbscm_print_insn_from_port ( struct gdbarch * gdbarch,
SCM port,
ULONGEST offset,
CORE_ADDR memaddr,
string_file * stream,
int * branch_delay_insns )
static

Variable Documentation

◆ address_symbol

SCM address_symbol
static

Definition at line 36 of file scm-disasm.c.

Referenced by dascm_make_insn(), and gdbscm_initialize_disasm().

◆ asm_symbol

SCM asm_symbol
static

Definition at line 37 of file scm-disasm.c.

Referenced by dascm_make_insn(), and gdbscm_initialize_disasm().

◆ count_keyword

SCM count_keyword
static

Definition at line 34 of file scm-disasm.c.

Referenced by gdbscm_arch_disassemble(), and gdbscm_initialize_disasm().

◆ disasm_functions

const scheme_function disasm_functions[]
static
Initial value:
=
{
{ "arch-disassemble", 2, 0, 1, as_a_scm_t_subr (gdbscm_arch_disassemble),
"\
Return list of disassembled instructions in memory.\n\
\n\
Arguments: <gdb:arch> start-address\n\
[#:port port] [#:offset address]\n\
[#:size <integer>] [#:count <integer>]\n\
port: If non-#f, it is an input port to read bytes from.\n\
offset: Specifies the address offset of the first byte in the port.\n\
This is useful if the input is from something other than memory\n\
(e.g., a bytevector) and you want the result to be as if the bytes\n\
came from that address. The value to pass for start-address is\n\
then also the desired disassembly address, not the offset in, e.g.,\n\
the bytevector.\n\
size: Limit the number of bytes read to this amount.\n\
count: Limit the number of instructions to this amount.\n\
\n\
Returns:\n\
Each instruction in the result is an alist:\n\
(('address . address) ('asm . disassembly) ('length . length))." },
}
#define END_FUNCTIONS
static scm_t_subr as_a_scm_t_subr(SCM(*func)(void))
static SCM gdbscm_arch_disassemble(SCM self, SCM start_scm, SCM rest)
Definition scm-disasm.c:174

Definition at line 279 of file scm-disasm.c.

Referenced by gdbscm_initialize_disasm().

◆ length_symbol

SCM length_symbol
static

Definition at line 38 of file scm-disasm.c.

Referenced by dascm_make_insn(), and gdbscm_initialize_disasm().

◆ offset_keyword

SCM offset_keyword
static

Definition at line 32 of file scm-disasm.c.

Referenced by gdbscm_arch_disassemble(), and gdbscm_initialize_disasm().

◆ port_keyword

SCM port_keyword
static

Definition at line 31 of file scm-disasm.c.

Referenced by gdbscm_arch_disassemble(), and gdbscm_initialize_disasm().

◆ size_keyword

SCM size_keyword
static

Definition at line 33 of file scm-disasm.c.

Referenced by gdbscm_arch_disassemble(), and gdbscm_initialize_disasm().