66 char line_buf[50], *pname;
76 pid_name =
"No process";
84 pid_width = strlen (pid_name);
89 string = (
char *)
xmalloc (status_size + 1);
90 buf = (
char*) alloca (status_size + 1);
94 xsnprintf (line_buf,
sizeof (line_buf),
"%d",
loc->line_no);
96 strcpy (line_buf,
"??");
97 line_width = strlen (line_buf);
107 const char *pc_buf = pc_out.
c_str ();
108 int pc_width = pc_out.
size ();
113 proc_width = (status_size
118 - (
sizeof (
PC_PREFIX) - 1 + pc_width + 1)
127 proc_width += target_width + 1;
131 proc_width += pid_width + 1;
135 proc_width += pc_width +
sizeof (
PC_PREFIX) - 1 + 1;
139 proc_width += line_width +
sizeof (
LINE_PREFIX) - 1 + 1;
149 pname =
loc->proc_name;
157 if (target_width > 0)
159 sprintf (buf,
"%*.*s ",
165 sprintf (buf,
"%*.*s ",
166 -pid_width, pid_width, pid_name);
180 if (strlen (pname) > proc_width)
182 1 - proc_width, proc_width - 1, pname);
185 -proc_width, proc_width, pname);
192 -line_width, line_width, line_buf);
202 for (i = strlen (
string); i < status_size; i++)
204 string[status_size] = (char) 0;
215 static char name[256];
224 const char *d = stream.
c_str ();
227 strncpy (
name, d,
sizeof (
name) - 1);
230 char *p = strchr (
name,
'(');
232 p = strchr (
name,
'>');
235 p = strchr (
name,
'+');
249 if (locator != NULL && locator->
handle != (WINDOW *) NULL)
256 wmove (locator->
handle, 0, 0);
262 (void) wstandout (locator->
handle);
263 waddstr (locator->
handle,
string);
264 wclrtoeol (locator->
handle);
265 (void) wstandend (locator->
handle);
267 wmove (locator->
handle, 0, 0);
281 if (locator->
content[0] == NULL)
299 const char *fullname,
300 const char *procname,
306 int locator_changed_p = 0;
313 locator_changed_p = 1;
316 if (procname == NULL)
319 if (fullname == NULL)
324 locator_changed_p |= strncmp (element->
proc_name, procname,
326 locator_changed_p |= lineno != element->
line_no;
327 locator_changed_p |=
addr != element->
addr;
329 locator_changed_p |= strncmp (element->
full_name, fullname,
339 return locator_changed_p;
360 int locator_changed_p;
368 int source_already_displayed;
373 source_already_displayed = sal.
symtab != 0
387 "??",
_(
"<unavailable>"), sal.
line, 0);
392 if (!locator_changed_p)
403 item = &
locator->content[0]->which_element;
414 (
const char **) NULL,
432 if (!(source_already_displayed
472 if (!locator_changed_p)
494 _(
"Update the source window and locator to " 495 "display the current execution point.\n"));
CORE_ADDR get_frame_pc(struct frame_info *frame)
static char * tui_get_function_from_frame(struct frame_info *fi)
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)
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)
enum tui_line_or_address_kind loa
void tui_update_locator_fullname(const char *fullname)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void execute_command(const char *, int)
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]
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
tui_win_content tui_alloc_content(int num_elements, enum tui_win_type type)
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)
symtab_and_line find_frame_sal(frame_info *frame)
static char * tui_make_status_line(struct tui_locator_element *loc)
void tui_show_locator_content(void)
union tui_which_element which_element
int xsnprintf(char *str, size_t size, const char *format,...)
const char * c_str() const
static void tui_update_command(const char *, int)
union tui_line_or_address::@181 u
const char * target_pid_to_str(ptid_t ptid)
#define MAX_LOCATOR_ELEMENT_LEN
int ptid_equal(const ptid_t &ptid1, const ptid_t &ptid2)
int tui_show_frame_info(struct frame_info *fi)
#define EMPTY_SOURCE_PROMPT
int print_address_symbolic(struct gdbarch *, CORE_ADDR, struct ui_file *, int, const char *)
void tui_refresh_win(struct tui_gen_win_info *win_info)
void _initialize_tui_stack(void)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_const_cfunc_ftype *fun, const char *doc)
enum tui_key_mode tui_current_key_mode
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)