translation_unit
preproc_if
#if "#if"
identifier "HAVE_CONFIG_H"
"\n"
preproc_include
#include "#include"
string_literal
" "\""
string_content "config.h"
" "\""
#endif "#endif"
comment "/* HAVE_CONFIG_H */"
preproc_ifdef
#ifdef "#ifdef"
identifier "HAVE_SYS_TYPES_H"
preproc_include
#include "#include"
system_lib_string "<sys/types.h>"
#endif "#endif"
comment "/* HAVE_SYS_TYPES_H */"
preproc_ifdef
#ifdef "#ifdef"
identifier "HAVE_FCNTL_H"
preproc_include
#include "#include"
system_lib_string "<fcntl.h>"
#endif "#endif"
comment "/* HAVE_FCNTL_H */"
preproc_if
#if "#if"
identifier "HAVE_UNISTD_H"
"\n"
preproc_include
#include "#include"
system_lib_string "<unistd.h>"
#endif "#endif"
comment "/* HAVE_UNISTD_H */"
preproc_if
#if "#if"
identifier "HAVE_SIGNAL_H"
"\n"
preproc_include
#include "#include"
system_lib_string "<signal.h>"
#endif "#endif"
preproc_if
#if "#if"
identifier "HAVE_STDLIB_H"
"\n"
preproc_include
#include "#include"
system_lib_string "<stdlib.h>"
#endif "#endif"
comment "/* HAVE_STDLIB_H */"
preproc_if
#if "#if"
identifier "HAVE_STDIO_H"
"\n"
preproc_include
#include "#include"
system_lib_string "<stdio.h>"
#endif "#endif"
comment "/* HAVE_STDIO_H */"
preproc_ifdef
#ifdef "#ifdef"
identifier "HAVE_SYS_TIME_H"
preproc_include
#include "#include"
system_lib_string "<sys/time.h>"
#endif "#endif"
preproc_ifdef
#ifdef "#ifdef"
identifier "HAVE_SYS_SELECT_H"
preproc_include
#include "#include"
system_lib_string "<sys/select.h>"
#endif "#endif"
comment "/* HAVE_SYS_SELECT_H */"
preproc_if
#if "#if"
identifier "HAVE_SYS_STAT_H"
"\n"
preproc_include
#include "#include"
system_lib_string "<sys/stat.h>"
#endif "#endif"
preproc_if
#if "#if"
identifier "HAVE_STRING_H"
"\n"
preproc_include
#include "#include"
system_lib_string "<string.h>"
#endif "#endif"
comment "/* HAVE_STRING_H */"
preproc_if
#if "#if"
identifier "HAVE_SYS_IOCTL_H"
"\n"
preproc_include
#include "#include"
system_lib_string "<sys/ioctl.h>"
#endif "#endif"
comment "/* HAVE_SYS_IOCTL_H */"
preproc_if
#if "#if"
identifier "HAVE_ERRNO_H"
"\n"
preproc_include
#include "#include"
system_lib_string "<errno.h>"
#endif "#endif"
comment "/* HAVE_ERRNO_H */"
preproc_ifdef
#ifdef "#ifdef"
identifier "HAVE_GETOPT_H"
preproc_include
#include "#include"
system_lib_string "<getopt.h>"
#endif "#endif"
preproc_if
#if "#if"
identifier "HAVE_CTYPE_H"
"\n"
preproc_include
#include "#include"
system_lib_string "<ctype.h>"
#endif "#endif"
preproc_include
#include "#include"
system_lib_string "<string>"
preproc_def
#define "#define"
identifier "__STDC_FORMAT_MACROS"
preproc_include
#include "#include"
system_lib_string "<inttypes.h>"
comment "/* Local Includes */"
preproc_include
#include "#include"
string_literal
" "\""
string_content "sys_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "stretchy.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "sys_win.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "cgdb.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "tokenizer.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "highlight_groups.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "interface.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "scroller.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "sources.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "tgdb.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "kui_ctx.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "kui_map_set.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "kui_term.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "kui_manager.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "fs_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "cgdbrc.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "io.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "fork_util.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "terminal.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "rline.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "usage.h"
" "\""
comment "/* --------- */"
comment "/* Constants */"
comment "/* --------- */"
preproc_def
#define "#define"
identifier "GDB_MAXBUF"
preproc_arg "4096 "
comment "/* GDB input buffer size */"
comment "/* --------------- */"
comment "/* Local Variables */"
comment "/* --------------- */"
declaration
struct_specifier
struct "struct"
type_identifier "tgdb"
pointer_declarator
* "*"
identifier "tgdb"
; ";"
comment "/* The main TGDB context */"
declaration
qualified_identifier
namespace_identifier "std"
:: "::"
type_identifier "string"
identifier "cgdb_home_dir"
; ";"
comment "/* Path to home dir with trailing slash */"
declaration
qualified_identifier
namespace_identifier "std"
:: "::"
type_identifier "string"
identifier "cgdb_log_dir"
; ";"
comment "/* Path to log dir with trailing slash */"
declaration
storage_class_specifier
static "static"
primitive_type "int"
init_declarator
identifier "gdb_console_fd"
= "="
number_literal "-1"
; ";"
comment "/* GDB console descriptor */"
declaration
storage_class_specifier
static "static"
primitive_type "int"
init_declarator
identifier "gdb_mi_fd"
= "="
number_literal "-1"
; ";"
comment "/* GDB Machine Interface descriptor */"
declaration
storage_class_specifier
static "static"
primitive_type "bool"
init_declarator
identifier "new_ui_unsupported"
= "="
false "false"
; ";"
declaration
storage_class_specifier
static "static"
primitive_type "char"
init_declarator
pointer_declarator
* "*"
identifier "debugger_path"
= "="
null
NULL "NULL"
; ";"
comment "/* Path to debugger to use */"
comment "/* Set to 1 if the user requested cgdb to wait for the debug"...
declaration
storage_class_specifier
static "static"
primitive_type "int"
init_declarator
identifier "wait_for_debugger_to_attach"
= "="
number_literal "0"
; ";"
declaration
qualified_identifier
namespace_identifier "std"
:: "::"
template_type
type_identifier "unique_ptr"
template_argument_list
< "<"
type_descriptor
type_identifier "kui_manager"
> ">"
identifier "kui_ctx"
; ";"
comment "/* The key input package */"
declaration
qualified_identifier
namespace_identifier "std"
:: "::"
template_type
type_identifier "shared_ptr"
template_argument_list
< "<"
type_descriptor
type_identifier "kui_map_set"
> ">"
identifier "kui_map"
; ";"
declaration
qualified_identifier
namespace_identifier "std"
:: "::"
template_type
type_identifier "shared_ptr"
template_argument_list
< "<"
type_descriptor
type_identifier "kui_map_set"
> ">"
identifier "kui_imap"
; ";"
comment "/**\n * This allows CGDB to know if it is acceptable to read "...
declaration
primitive_type "int"
init_declarator
identifier "kui_input_acceptable"
= "="
number_literal "1"
; ";"
comment "/**\n * This pipe is used for passing SIGWINCH from the handl"...
declaration
primitive_type "int"
init_declarator
array_declarator
identifier "resize_pipe"
[ "["
number_literal "2"
] "]"
= "="
initializer_list
{ "{"
number_literal "-1"
, ","
number_literal "-1"
} "}"
; ";"
comment "/**\n * This pipe is used for passing signals from the handle"...
declaration
primitive_type "int"
init_declarator
array_declarator
identifier "signal_pipe"
[ "["
number_literal "2"
] "]"
= "="
initializer_list
{ "{"
number_literal "-1"
, ","
number_literal "-1"
} "}"
; ";"
comment "/* Original terminal attributes */"
declaration
storage_class_specifier
static "static"
struct_specifier
struct "struct"
type_identifier "termios"
identifier "term_attributes"
; ";"
comment "/**\n * Runs a command in the shell. The shell may be intera"...
function_definition (+212 nodes collapsed)
function_definition (+47 nodes collapsed)
comment "/* ------------------------ */"
comment "/* Initialization functions */"
comment "/* ------------------------ */"
comment "/* version_info: Returns version information about cgdb.\n * "...
function_definition (+82 nodes collapsed)
function_definition (+506 nodes collapsed)
comment "/**\n * Attempts to create a config directory in the user's h"...
function_definition (+189 nodes collapsed)
comment "/**\n * Console output has returned from GDB, show it.\n *\n * "...
function_definition (+43 nodes collapsed)
declaration (+23 nodes collapsed)
declaration (+32 nodes collapsed)
declaration (+35 nodes collapsed)
declaration (+47 nodes collapsed)
declaration (+47 nodes collapsed)
declaration
type_identifier "tgdb_callbacks"
init_declarator
identifier "callbacks"
= "="
initializer_list
{ "{"
null
NULL "NULL"
, ","
identifier "console_output"
, ","
identifier "command_response"
, ","
identifier "breakpoints"
, ","
identifier "inferiors_source_files"
, ","
identifier "disassemble_func"
, ","
identifier "disassemble_pc"
} "}"
; ";"
comment "/* start_gdb: Starts up libtgdb\n * Returns: -1 on error, 0"...
function_definition (+62 nodes collapsed)
function_definition (+41 nodes collapsed)
comment "/* user_input: This function will get a key from the user an"...
function_definition (+317 nodes collapsed)
comment "/**\n * This will usually process all the input that the KUI "...
function_definition (+80 nodes collapsed)
comment "/* This updates all the breakpoints */"
function_definition (+55 nodes collapsed)
comment "/* This means a source file or line number changed */"
function_definition
storage_class_specifier
static "static"
primitive_type "void"
function_declarator
identifier "update_file_position"
parameter_list
( "("
parameter_declaration
struct_specifier
struct "struct"
type_identifier "tgdb_response"
pointer_declarator
* "*"
identifier "response"
) ")"
compound_statement
{ "{"
comment "/**\n * Updating the location that cgdb should point the "...
declaration
struct_specifier
struct "struct"
type_identifier "tgdb_file_position"
pointer_declarator
* "*"
identifier "tfp"
; ";"
declaration
struct_specifier
struct "struct"
type_identifier "sviewer"
init_declarator
pointer_declarator
* "*"
identifier "sview"
= "="
call_expression
identifier "if_get_sview"
argument_list
( "("
) ")"
; ";"
declaration
primitive_type "int"
init_declarator
identifier "source_reload_status"
= "="
number_literal "-1"
; ";"
expression_statement
assignment_expression
identifier "tfp"
= "="
field_expression
field_expression
field_expression
identifier "response"
-> "->"
field_identifier "choice"
. "."
field_identifier "update_file_position"
. "."
field_identifier "file_position"
; ";"
comment "/* Tell source viewer what the current $pc address is. */"
expression_statement
assignment_expression
field_expression
identifier "sview"
-> "->"
field_identifier "addr_frame"
= "="
field_expression
identifier "tfp"
-> "->"
field_identifier "addr"
; ";"
comment "/* If we got a pathname and we're not showing disasm... */"
if_statement
if "if"
condition_clause
( "("
binary_expression
field_expression
identifier "tfp"
-> "->"
field_identifier "path"
&& "&&"
unary_expression
! "!"
call_expression
identifier "cgdbrc_get_int"
argument_list
( "("
identifier "CGDBRC_DISASM"
) ")"
) ")"
compound_statement
{ "{"
comment "/**\n * GDB will provide an executing line number eve"...
declaration
primitive_type "int"
init_declarator
identifier "exe_line"
= "="
conditional_expression
field_expression
identifier "sview"
-> "->"
field_identifier "addr_frame"
? "?"
field_expression
identifier "tfp"
-> "->"
field_identifier "line_number"
: ":"
number_literal "-1"
; ";"
comment "/* Update the file */"
expression_statement
assignment_expression
identifier "source_reload_status"
= "="
call_expression
identifier "source_reload"
argument_list
( "("
call_expression
identifier "if_get_sview"
argument_list
( "("
) ")"
, ","
field_expression
identifier "tfp"
-> "->"
field_identifier "path"
, ","
number_literal "0"
) ")"
; ";"
comment "/* Show the source file at this line number */"
expression_statement
call_expression
identifier "if_show_file"
argument_list
( "("
field_expression
identifier "tfp"
-> "->"
field_identifier "path"
, ","
field_expression
identifier "tfp"
-> "->"
field_identifier "line_number"
, ","
identifier "exe_line"
) ")"
; ";"
} "}"
comment "/**\n * Sometimes gdb provides a path that can not be fou"...
if_statement (+93 nodes collapsed)
} "}"
comment "/* This is a list of all the source files */"
function_definition (+217 nodes collapsed)
function_definition (+382 nodes collapsed)
function_definition
storage_class_specifier
static "static"
primitive_type "void"
function_declarator
identifier "command_response"
parameter_list
( "("
parameter_declaration
primitive_type "void"
pointer_declarator
* "*"
identifier "context"
, ","
parameter_declaration
struct_specifier
struct "struct"
type_identifier "tgdb_response"
pointer_declarator
* "*"
identifier "response"
) ")"
compound_statement
{ "{"
switch_statement
switch "switch"
condition_clause
( "("
field_expression
identifier "response"
-> "->"
field_identifier "header"
) ")"
compound_statement
{ "{"
case_statement
case "case"
identifier "TGDB_UPDATE_FILE_POSITION"
: ":"
expression_statement
call_expression
identifier "update_file_position"
argument_list
( "("
identifier "response"
) ")"
; ";"
break_statement
break "break"
; ";"
case_statement (+30 nodes collapsed)
} "}"
} "}"
function_definition (+42 nodes collapsed)
function_definition (+45 nodes collapsed)
function_definition (+65 nodes collapsed)
function_definition (+65 nodes collapsed)
comment "/* gdb_input: Receives data from tgdb:\n *\n * Returns: -1 o"...
function_definition (+66 nodes collapsed)
function_definition (+161 nodes collapsed)
comment "/**\n * Handles the signals that were received from the main "...
function_definition (+83 nodes collapsed)
function_definition (+536 nodes collapsed)
comment "/* ----------------- */"
comment "/* Exposed Functions */"
comment "/* ----------------- */"
comment "/* cgdb_cleanup_and_exit: Invoked by the various err_xxx fun"...
function_definition (+206 nodes collapsed)
function_definition (+50 nodes collapsed)
function_definition (+53 nodes collapsed)
function_definition (+47 nodes collapsed)
function_definition (+88 nodes collapsed)
function_definition (+258 nodes collapsed)
comment "/**\n * Create the log files.\n */"
function_definition (+120 nodes collapsed)
function_definition (+581 nodes collapsed)