GDB (xrefs)
Classes | Macros | Functions
/tmp/gdb-8.1/gdb/location.c File Reference
#include "defs.h"
#include "gdb_assert.h"
#include "location.h"
#include "symtab.h"
#include "language.h"
#include "linespec.h"
#include "cli/cli-utils.h"
#include "probe.h"
#include "cp-support.h"
#include <ctype.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  event_location
 

Macros

#define EL_TYPE(P)   (P)->type
 
#define EL_PROBE(P)   ((P)->u.addr_string)
 
#define EL_LINESPEC(P)   (&(P)->u.linespec_location)
 
#define EL_ADDRESS(P)   (P)->u.address
 
#define EL_EXPLICIT(P)   (&((P)->u.explicit_loc))
 
#define EL_STRING(P)   ((P)->as_string)
 

Functions

enum event_location_type event_location_type (const struct event_location *location)
 
void initialize_explicit_location (struct explicit_location *explicit_loc)
 
event_location_up new_linespec_location (const char **linespec, symbol_name_match_type match_type)
 
const linespec_locationget_linespec_location (const struct event_location *location)
 
event_location_up new_address_location (CORE_ADDR addr, const char *addr_string, int addr_string_len)
 
CORE_ADDR get_address_location (const struct event_location *location)
 
const char * get_address_string_location (const struct event_location *location)
 
event_location_up new_probe_location (const char *probe)
 
const char * get_probe_location (const struct event_location *location)
 
event_location_up new_explicit_location (const struct explicit_location *explicit_loc)
 
struct explicit_locationget_explicit_location (struct event_location *location)
 
const struct explicit_locationget_explicit_location_const (const struct event_location *location)
 
static char * explicit_to_string_internal (int as_linespec, const struct explicit_location *explicit_loc)
 
char * explicit_location_to_string (const struct explicit_location *explicit_loc)
 
char * explicit_location_to_linespec (const struct explicit_location *explicit_loc)
 
event_location_up copy_event_location (const struct event_location *src)
 
const char * event_location_to_string (struct event_location *location)
 
static const char * find_end_quote (const char *s, char end_quote_char)
 
static gdb::unique_xmalloc_ptr< char > explicit_location_lex_one (const char **inp, const struct language_defn *language, explicit_completion_info *completion_info)
 
static bool is_cp_operator (const char *start, const char *comma)
 
static const char * skip_op_false_positives (const char *start, const char *found)
 
static const char * first_of (const char *first, const char *new_tok)
 
static gdb::unique_xmalloc_ptr< char > explicit_location_lex_one_function (const char **inp, const struct language_defn *language, explicit_completion_info *completion_info)
 
event_location_up string_to_explicit_location (const char **argp, const struct language_defn *language, explicit_completion_info *completion_info)
 
event_location_up string_to_event_location_basic (const char **stringp, const struct language_defn *language, symbol_name_match_type match_type)
 
event_location_up string_to_event_location (const char **stringp, const struct language_defn *language, symbol_name_match_type match_type)
 
int event_location_empty_p (const struct event_location *location)
 
void set_event_location_string (struct event_location *location, const char *string)
 

Macro Definition Documentation

◆ EL_ADDRESS

#define EL_ADDRESS (   P)    (P)->u.address

◆ EL_EXPLICIT

#define EL_EXPLICIT (   P)    (&((P)->u.explicit_loc))

◆ EL_LINESPEC

#define EL_LINESPEC (   P)    (&(P)->u.linespec_location)

◆ EL_PROBE

#define EL_PROBE (   P)    ((P)->u.addr_string)

◆ EL_STRING

#define EL_STRING (   P)    ((P)->as_string)

◆ EL_TYPE

#define EL_TYPE (   P)    (P)->type

Function Documentation

◆ copy_event_location()

event_location_up copy_event_location ( const struct event_location src)

◆ event_location_empty_p()

int event_location_empty_p ( const struct event_location location)

◆ event_location_to_string()

const char* event_location_to_string ( struct event_location location)

◆ event_location_type()

enum event_location_type event_location_type ( const struct event_location location)

Definition at line 70 of file location.c.

References EL_TYPE.

◆ explicit_location_lex_one()

static gdb::unique_xmalloc_ptr<char> explicit_location_lex_one ( const char **  inp,
const struct language_defn language,
explicit_completion_info completion_info 
)
static

◆ explicit_location_lex_one_function()

static gdb::unique_xmalloc_ptr<char> explicit_location_lex_one_function ( const char **  inp,
const struct language_defn language,
explicit_completion_info completion_info 
)
static

◆ explicit_location_to_linespec()

char* explicit_location_to_linespec ( const struct explicit_location explicit_loc)

Definition at line 299 of file location.c.

References explicit_to_string_internal().

Referenced by canonicalize_linespec().

◆ explicit_location_to_string()

char* explicit_location_to_string ( const struct explicit_location explicit_loc)

Definition at line 291 of file location.c.

References explicit_to_string_internal().

Referenced by event_location_to_string().

◆ explicit_to_string_internal()

static char* explicit_to_string_internal ( int  as_linespec,
const struct explicit_location explicit_loc 
)
static

◆ find_end_quote()

static const char* find_end_quote ( const char *  s,
char  end_quote_char 
)
static

Definition at line 445 of file location.c.

References scan().

Referenced by explicit_location_lex_one().

◆ first_of()

static const char* first_of ( const char *  first,
const char *  new_tok 
)
static

Definition at line 610 of file location.c.

Referenced by explicit_location_lex_one_function().

◆ get_address_location()

CORE_ADDR get_address_location ( const struct event_location location)

Definition at line 137 of file location.c.

References ADDRESS_LOCATION, EL_ADDRESS, EL_TYPE, and gdb_assert.

Referenced by event_location_to_sals().

◆ get_address_string_location()

const char* get_address_string_location ( const struct event_location location)

Definition at line 146 of file location.c.

References ADDRESS_LOCATION, EL_STRING, EL_TYPE, and gdb_assert.

Referenced by event_location_to_sals().

◆ get_explicit_location()

struct explicit_location* get_explicit_location ( struct event_location location)

◆ get_explicit_location_const()

const struct explicit_location* get_explicit_location_const ( const struct event_location location)

Definition at line 222 of file location.c.

References EL_EXPLICIT, EL_TYPE, EXPLICIT_LOCATION, and gdb_assert.

Referenced by event_location_to_sals().

◆ get_linespec_location()

const linespec_location* get_linespec_location ( const struct event_location location)

◆ get_probe_location()

const char* get_probe_location ( const struct event_location location)

Definition at line 169 of file location.c.

References EL_PROBE, EL_TYPE, gdb_assert, and PROBE_LOCATION.

Referenced by parse_probes().

◆ initialize_explicit_location()

void initialize_explicit_location ( struct explicit_location explicit_loc)

◆ is_cp_operator()

static bool is_cp_operator ( const char *  start,
const char *  comma 
)
static

Definition at line 553 of file location.c.

References CP_OPERATOR_LEN, and CP_OPERATOR_STR.

Referenced by skip_op_false_positives().

◆ new_address_location()

event_location_up new_address_location ( CORE_ADDR  addr,
const char *  addr_string,
int  addr_string_len 
)

◆ new_explicit_location()

event_location_up new_explicit_location ( const struct explicit_location explicit_loc)

◆ new_linespec_location()

event_location_up new_linespec_location ( const char **  linespec,
symbol_name_match_type  match_type 
)

◆ new_probe_location()

event_location_up new_probe_location ( const char *  probe)

◆ set_event_location_string()

void set_event_location_string ( struct event_location location,
const char *  string 
)

Definition at line 981 of file location.c.

References EL_STRING, and xfree().

Referenced by canonicalize_linespec().

◆ skip_op_false_positives()

static const char* skip_op_false_positives ( const char *  start,
const char *  found 
)
static

Definition at line 591 of file location.c.

References find_toplevel_char(), and is_cp_operator().

Referenced by explicit_location_lex_one_function().

◆ string_to_event_location()

event_location_up string_to_event_location ( const char **  stringp,
const struct language_defn language,
symbol_name_match_type  match_type 
)

◆ string_to_event_location_basic()

event_location_up string_to_event_location_basic ( const char **  stringp,
const struct language_defn language,
symbol_name_match_type  match_type 
)

◆ string_to_explicit_location()

event_location_up string_to_explicit_location ( const char **  argp,
const struct language_defn language,
explicit_completion_info completion_info 
)