66 char line_buf[50], *pname;
79 pid_name =
"No process";
87 pid_width = strlen (pid_name);
92 string = (
char *)
xmalloc (status_size + 1);
93 buf = (
char*) alloca (status_size + 1);
99 strcpy (line_buf,
"??");
100 line_width = strlen (line_buf);
109 pc_width = strlen (pc_buf);
114 proc_width = (status_size
119 - (
sizeof (
PC_PREFIX) - 1 + pc_width + 1)
128 proc_width += target_width + 1;
132 proc_width += pid_width + 1;
136 proc_width += pc_width +
sizeof (
PC_PREFIX) - 1 + 1;
140 proc_width += line_width +
sizeof (
LINE_PREFIX) - 1 + 1;
158 if (target_width > 0)
160 sprintf (buf,
"%*.*s ",
166 sprintf (buf,
"%*.*s ",
167 -pid_width, pid_width, pid_name);
181 if (strlen (pname) > proc_width)
183 1 - proc_width, proc_width - 1, pname);
186 -proc_width, proc_width, pname);
193 -line_width, line_width, line_buf);
203 for (i = strlen (
string); i < status_size; i++)
205 string[status_size] = (char) 0;
217 static char name[256];
230 strncpy (name, p,
sizeof (name) - 1);
231 name[
sizeof (
name) - 1] = 0;
232 p = strchr (name,
'(');
234 p = strchr (name,
'>');
237 p = strchr (name,
'+');
252 if (locator != NULL && locator->
handle != (WINDOW *) NULL)
259 wmove (locator->
handle, 0, 0);
265 (void) wstandout (locator->
handle);
266 waddstr (locator->
handle,
string);
267 wclrtoeol (locator->
handle);
268 (void) wstandend (locator->
handle);
270 wmove (locator->
handle, 0, 0);
284 if (locator->
content[0] == NULL)
302 const char *fullname,
303 const char *procname,
309 int locator_changed_p = 0;
316 locator_changed_p = 1;
319 if (procname == NULL)
322 if (fullname == NULL)
327 locator_changed_p |= strncmp (element->
proc_name, procname,
329 locator_changed_p |= lineno != element->
line_no;
330 locator_changed_p |= addr != element->
addr;
331 locator_changed_p |= gdbarch != element->
gdbarch;
332 locator_changed_p |= strncmp (element->
full_name, fullname,
342 return locator_changed_p;
363 int locator_changed_p;
371 int source_already_displayed;
377 source_already_displayed = sal.
symtab != 0
391 "??",
_(
"<unavailable>"), sal.
line, 0);
396 if (!locator_changed_p)
418 (
const char **) NULL,
436 if (!(source_already_displayed
476 if (!locator_changed_p)
501 _(
"Update the source window and locator to "
502 "display the current execution point.\n"));
509 char cmd[
sizeof(
"frame 0")];
511 strcpy (cmd,
"frame 0");
char * tui_file_get_strbuf(struct ui_file *file)
CORE_ADDR get_frame_pc(struct frame_info *frame)
int ptid_equal(ptid_t ptid1, ptid_t ptid2)
static char * tui_get_function_from_frame(struct frame_info *fi)
void ui_file_delete(struct ui_file *file)
initialize_file_ftype _initialize_tui_stack
int get_frame_pc_if_available(struct frame_info *frame, CORE_ADDR *pc)
struct tui_list * tui_source_windows(void)
int tui_source_is_displayed(const char *fullname)
void tui_update_exec_info(struct tui_win_info *win_info)
union tui_line_or_address::@171 u
static void tui_set_locator_fullname(const char *fullname)
void tui_set_is_exec_point_at(struct tui_line_or_address l, struct tui_win_info *win_info)
char * target_pid_to_str(ptid_t ptid)
void execute_command(char *, int)
enum tui_line_or_address_kind loa
static void tui_update_command(char *, int)
void tui_update_locator_fullname(const char *fullname)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
const char * symtab_to_fullname(struct symtab *s)
void tui_update_source_window(struct tui_win_info *win_info, struct gdbarch *gdbarch, struct symtab *s, struct tui_line_or_address line_or_addr, int noerror)
char full_name[MAX_LOCATOR_ELEMENT_LEN]
void find_frame_sal(struct frame_info *frame, struct symtab_and_line *sal)
struct tui_locator_element locator
static int tui_set_locator_info(struct gdbarch *gdbarch, const char *fullname, const char *procname, int lineno, CORE_ADDR addr)
struct tui_gen_win_info generic
void initialize_file_ftype(void)
tui_win_content tui_alloc_content(int num_elements, enum tui_win_type type)
struct ui_file * tui_sfileopen(int n)
void strcat_to_buf(char *buf, int buflen, const char *item_to_add)
void tui_clear_source_content(struct tui_win_info *win_info, int display_prompt)
void fputs_filtered(const char *linebuffer, struct ui_file *stream)
struct tui_gen_win_info * tui_locator_win_info_ptr(void)
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
int tui_addr_is_displayed(CORE_ADDR addr, struct tui_win_info *win_info, int check_threshold)
static char * tui_make_status_line(struct tui_locator_element *loc)
void tui_show_locator_content(void)
union tui_which_element which_element
int print_address_symbolic(struct gdbarch *, CORE_ADDR, struct ui_file *, int, char *)
int xsnprintf(char *str, size_t size, const char *format,...)
#define MAX_LOCATOR_ELEMENT_LEN
int tui_show_frame_info(struct frame_info *fi)
#define EMPTY_SOURCE_PROMPT
void tui_refresh_win(struct tui_gen_win_info *win_info)
enum tui_key_mode tui_current_key_mode
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
char proc_name[MAX_LOCATOR_ELEMENT_LEN]
int tui_line_is_displayed(int line, struct tui_win_info *win_info, int check_threshold)
CORE_ADDR tui_get_low_disassembly_address(struct gdbarch *gdbarch, CORE_ADDR low, CORE_ADDR pc)