GDB (xrefs)
tui-data.c
Go to the documentation of this file.
1 /* TUI data manipulation routines.
2 
3  Copyright (C) 1998-2015 Free Software Foundation, Inc.
4 
5  Contributed by Hewlett-Packard Company.
6 
7  This file is part of GDB.
8 
9  This program is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 3 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 
22 #include "defs.h"
23 #include "symtab.h"
24 #include "tui/tui.h"
25 #include "tui/tui-data.h"
26 #include "tui/tui-wingeneral.h"
27 #include "gdb_curses.h"
28 
29 /****************************
30 ** GLOBAL DECLARATIONS
31 ****************************/
33 
34 /***************************
35 ** Private data
36 ****************************/
38 static int term_height, term_width;
39 static struct tui_gen_win_info _locator;
40 static struct tui_gen_win_info exec_info[2];
41 static struct tui_win_info *src_win_list[2];
42 static struct tui_list source_windows = {src_win_list, 0};
44 static struct tui_win_info *win_with_focus = (struct tui_win_info *) NULL;
45 static struct tui_layout_def layout_def = {
46  SRC_WIN, /* DISPLAY_MODE */
47  FALSE}; /* SPLIT */
48 
49 static int win_resized = FALSE;
50 
51 
52 /*********************************
53 ** Static function forward decls
54 **********************************/
55 static void free_content (tui_win_content,
56  int,
57  enum tui_win_type);
59  int,
60  enum tui_win_type);
61 
62 
63 
64 /*********************************
65 ** PUBLIC FUNCTIONS
66 **********************************/
67 
68 int
70 {
71  return (win_type == SRC_WIN || win_type == DISASSEM_WIN);
72 }
73 
74 int
76 {
77  return (win_type > MAX_MAJOR_WINDOWS);
78 }
79 
80 int
82 {
83  return (win_info != NULL
84  && win_info->detail.source_info.has_locator);
85 }
86 
87 void
89  int highlight)
90 {
91  if (win_info != NULL)
92  win_info->is_highlighted = highlight;
93 }
94 
95 /******************************************
96 ** ACCESSORS & MUTATORS FOR PRIVATE DATA
97 ******************************************/
98 
99 /* Answer a whether the terminal window has been resized or not. */
100 int
102 {
103  return win_resized;
104 }
105 
106 
107 /* Set a whether the terminal window has been resized or not. */
108 void
110 {
111  win_resized = resized;
112 }
113 
114 
115 /* Answer a pointer to the current layout definition. */
116 struct tui_layout_def *
118 {
119  return &layout_def;
120 }
121 
122 
123 /* Answer the window with the logical focus. */
124 struct tui_win_info *
126 {
127  return win_with_focus;
128 }
129 
130 
131 /* Set the window that has the logical focus. */
132 void
134 {
135  win_with_focus = win_info;
136 }
137 
138 
139 /* Answer the length in chars, of tabs. */
140 int
142 {
143  return default_tab_len;
144 }
145 
146 
147 /* Set the length in chars, of tabs. */
148 void
150 {
152 }
153 
154 
155 /* Accessor for the current source window. Usually there is only one
156  source window (either source or disassembly), but both can be
157  displayed at the same time. */
158 struct tui_list *
160 {
161  return &source_windows;
162 }
163 
164 
165 /* Clear the list of source windows. Usually there is only one source
166  window (either source or disassembly), but both can be displayed at
167  the same time. */
168 void
170 {
171  source_windows.list[0] = NULL;
172  source_windows.list[1] = NULL;
173  source_windows.count = 0;
174 }
175 
176 
177 /* Clear the pertinant detail in the source windows. */
178 void
180 {
181  int i;
182 
183  for (i = 0; i < (tui_source_windows ())->count; i++)
185 }
186 
187 
188 /* Add a window to the list of source windows. Usually there is only
189  one source window (either source or disassembly), but both can be
190  displayed at the same time. */
191 void
193 {
194  if (source_windows.count < 2)
195  source_windows.list[source_windows.count++] = (void *) win_info;
196 }
197 
198 
199 /* Clear the pertinant detail in the windows. */
200 void
202 {
203  if (win_info != NULL)
204  {
205  switch (win_info->generic.type)
206  {
207  case SRC_WIN:
208  case DISASSEM_WIN:
209  win_info->detail.source_info.gdbarch = NULL;
212  win_info->detail.source_info.horizontal_offset = 0;
213  break;
214  case CMD_WIN:
215  win_info->detail.command_info.cur_line =
216  win_info->detail.command_info.curch = 0;
217  break;
218  case DATA_WIN:
220  (tui_win_content) NULL;
223  (tui_win_content) NULL;
226  win_info->detail.data_display_info.display_regs = FALSE;
227  break;
228  default:
229  break;
230  }
231  }
232 }
233 
234 
235 /* Accessor for the source execution info ptr. */
236 struct tui_gen_win_info *
238 {
239  return &exec_info[0];
240 }
241 
242 
243 /* Accessor for the disassem execution info ptr. */
244 struct tui_gen_win_info *
246 {
247  return &exec_info[1];
248 }
249 
250 
251 /* Accessor for the locator win info. Answers a pointer to the static
252  locator win info struct. */
253 struct tui_gen_win_info *
255 {
256  return &_locator;
257 }
258 
259 
260 /* Accessor for the term_height. */
261 int
263 {
264  return term_height;
265 }
266 
267 
268 /* Mutator for the term height. */
269 void
271 {
272  term_height = h;
273 }
274 
275 
276 /* Accessor for the term_width. */
277 int
279 {
280  return term_width;
281 }
282 
283 
284 /* Mutator for the term_width. */
285 void
287 {
288  term_width = w;
289 }
290 
291 
292 /* Accessor for the current layout. */
293 enum tui_layout_type
295 {
296  return current_layout;
297 }
298 
299 
300 /* Mutator for the current layout. */
301 void
303 {
304  current_layout = new_layout;
305 }
306 
307 
308 /*****************************
309 ** OTHER PUBLIC FUNCTIONS
310 *****************************/
311 
312 
313 /* Answer the next window in the list, cycling back to the top if
314  necessary. */
315 struct tui_win_info *
316 tui_next_win (struct tui_win_info *cur_win)
317 {
318  int type = cur_win->generic.type;
319  struct tui_win_info *next_win = (struct tui_win_info *) NULL;
320 
321  if (cur_win->generic.type == CMD_WIN)
322  type = SRC_WIN;
323  else
324  type = cur_win->generic.type + 1;
325  while (type != cur_win->generic.type && (next_win == NULL))
326  {
327  if (tui_win_list[type]
328  && tui_win_list[type]->generic.is_visible)
329  next_win = tui_win_list[type];
330  else
331  {
332  if (type == CMD_WIN)
333  type = SRC_WIN;
334  else
335  type++;
336  }
337  }
338 
339  return next_win;
340 }
341 
342 
343 /* Answer the prev window in the list, cycling back to the bottom if
344  necessary. */
345 struct tui_win_info *
346 tui_prev_win (struct tui_win_info *cur_win)
347 {
348  int type = cur_win->generic.type;
349  struct tui_win_info *prev = (struct tui_win_info *) NULL;
350 
351  if (cur_win->generic.type == SRC_WIN)
352  type = CMD_WIN;
353  else
354  type = cur_win->generic.type - 1;
355  while (type != cur_win->generic.type && (prev == NULL))
356  {
357  if (tui_win_list[type]
358  && tui_win_list[type]->generic.is_visible)
359  prev = tui_win_list[type];
360  else
361  {
362  if (type == SRC_WIN)
363  type = CMD_WIN;
364  else
365  type--;
366  }
367  }
368 
369  return prev;
370 }
371 
372 
373 /* Answer the window represented by name. */
374 struct tui_win_info *
376 {
377  struct tui_win_info *win_info = (struct tui_win_info *) NULL;
378 
379  if (name != (char *) NULL)
380  {
381  int i = 0;
382 
383  while (i < MAX_MAJOR_WINDOWS && win_info == NULL)
384  {
385  if (tui_win_list[i] != 0)
386  {
387  const char *cur_name =
388  tui_win_name (&tui_win_list[i]->generic);
389 
390  if (strlen (name) <= strlen (cur_name)
391  && startswith (cur_name, name))
392  win_info = tui_win_list[i];
393  }
394  i++;
395  }
396  }
397 
398  return win_info;
399 }
400 
401 
402 /* Answer the name of the window. */
403 const char *
404 tui_win_name (const struct tui_gen_win_info *win_info)
405 {
406  char *name = (char *) NULL;
407 
408  switch (win_info->type)
409  {
410  case SRC_WIN:
411  name = SRC_NAME;
412  break;
413  case CMD_WIN:
414  name = CMD_NAME;
415  break;
416  case DISASSEM_WIN:
417  name = DISASSEM_NAME;
418  break;
419  case DATA_WIN:
420  name = DATA_NAME;
421  break;
422  default:
423  name = "";
424  break;
425  }
426 
427  return name;
428 }
429 
430 
431 void
433 {
437 }
438 
439 
440 struct tui_gen_win_info *
442 {
443  struct tui_gen_win_info *win;
444 
445  if ((win = XNEW (struct tui_gen_win_info)) != NULL)
446  tui_init_generic_part (win);
447 
448  return win;
449 }
450 
451 
452 void
454 {
455  win->width =
456  win->height =
457  win->origin.x =
458  win->origin.y =
459  win->viewport_height =
460  win->content_size =
461  win->last_visible_line = 0;
462  win->handle = (WINDOW *) NULL;
463  win->content = NULL;
464  win->content_in_use =
465  win->is_visible = FALSE;
466  win->title = 0;
467 }
468 
469 
470 /* init_content_element().
471  */
472 static void
474  enum tui_win_type type)
475 {
476  element->highlight = FALSE;
477  switch (type)
478  {
479  case SRC_WIN:
480  case DISASSEM_WIN:
481  element->which_element.source.line = (char *) NULL;
484  element->which_element.source.is_exec_point = FALSE;
485  element->which_element.source.has_break = FALSE;
486  break;
487  case DATA_WIN:
493  break;
494  case CMD_WIN:
495  element->which_element.command.line = (char *) NULL;
496  break;
497  case DATA_ITEM_WIN:
498  element->which_element.data.name = (char *) NULL;
499  element->which_element.data.type = TUI_REGISTER;
501  element->which_element.data.value = NULL;
502  element->which_element.data.highlight = FALSE;
503  element->which_element.data.content = (char*) NULL;
504  break;
505  case LOCATOR_WIN:
506  element->which_element.locator.full_name[0] =
507  element->which_element.locator.proc_name[0] = (char) 0;
508  element->which_element.locator.line_no = 0;
509  element->which_element.locator.addr = 0;
510  break;
511  case EXEC_INFO_WIN:
512  memset(element->which_element.simple_string, ' ',
513  sizeof(element->which_element.simple_string));
514  break;
515  default:
516  break;
517  }
518 }
519 
520 static void
521 init_win_info (struct tui_win_info *win_info)
522 {
523  tui_init_generic_part (&win_info->generic);
524  win_info->can_highlight =
525  win_info->is_highlighted = FALSE;
526  switch (win_info->generic.type)
527  {
528  case SRC_WIN:
529  case DISASSEM_WIN:
531  = (struct tui_gen_win_info *) NULL;
532  win_info->detail.source_info.has_locator = FALSE;
533  win_info->detail.source_info.horizontal_offset = 0;
534  win_info->detail.source_info.gdbarch = NULL;
537  win_info->detail.source_info.fullname = NULL;
538  break;
539  case DATA_WIN:
545  win_info->detail.data_display_info.display_regs = FALSE;
546  win_info->detail.data_display_info.current_group = 0;
547  break;
548  case CMD_WIN:
549  win_info->detail.command_info.cur_line = 0;
550  win_info->detail.command_info.curch = 0;
551  break;
552  default:
553  win_info->detail.opaque = NULL;
554  break;
555  }
556 }
557 
558 
559 struct tui_win_info *
561 {
562  struct tui_win_info *win_info;
563 
564  win_info = XNEW (struct tui_win_info);
565  if (win_info != NULL)
566  {
567  win_info->generic.type = type;
568  init_win_info (win_info);
569  }
570 
571  return win_info;
572 }
573 
574 
575 /* Allocates the content and elements in a block. */
577 tui_alloc_content (int num_elements, enum tui_win_type type)
578 {
579  tui_win_content content;
580  char *element_block_ptr;
581  int i;
582 
583  content = xmalloc (sizeof (struct tui_win_element *) *num_elements);
584  if (content != NULL)
585  {
586  /*
587  * All windows, except the data window, can allocate the
588  * elements in a chunk. The data window cannot because items
589  * can be added/removed from the data display by the user at any
590  * time.
591  */
592  if (type != DATA_WIN)
593  {
594  element_block_ptr =
595  xmalloc (sizeof (struct tui_win_element) * num_elements);
596  if (element_block_ptr != NULL)
597  {
598  for (i = 0; i < num_elements; i++)
599  {
600  content[i] = (struct tui_win_element *) element_block_ptr;
601  init_content_element (content[i], type);
602  element_block_ptr += sizeof (struct tui_win_element);
603  }
604  }
605  else
606  {
607  xfree (content);
608  content = (tui_win_content) NULL;
609  }
610  }
611  }
612 
613  return content;
614 }
615 
616 
617 /* Adds the input number of elements to the windows's content. If no
618  content has been allocated yet, alloc_content() is called to do
619  this. The index of the first element added is returned, unless
620  there is a memory allocation error, in which case, (-1) is
621  returned. */
622 int
624  int num_elements)
625 {
626  struct tui_win_element *element_ptr;
627  int i, index_start;
628 
629  if (win_info->content == NULL)
630  {
631  win_info->content = tui_alloc_content (num_elements, win_info->type);
632  index_start = 0;
633  }
634  else
635  index_start = win_info->content_size;
636  if (win_info->content != NULL)
637  {
638  for (i = index_start; (i < num_elements + index_start); i++)
639  {
640  if ((element_ptr = XNEW (struct tui_win_element)) != NULL)
641  {
642  win_info->content[i] = (void *) element_ptr;
643  init_content_element (element_ptr, win_info->type);
644  win_info->content_size++;
645  }
646  else /* Things must be really hosed now! We ran out of
647  memory!? */
648  return (-1);
649  }
650  }
651 
652  return index_start;
653 }
654 
655 
656 /* Delete all curses windows associated with win_info, leaving
657  everything else intact. */
658 void
659 tui_del_window (struct tui_win_info *win_info)
660 {
661  struct tui_gen_win_info *generic_win;
662 
663  switch (win_info->generic.type)
664  {
665  case SRC_WIN:
666  case DISASSEM_WIN:
667  generic_win = tui_locator_win_info_ptr ();
668  if (generic_win != (struct tui_gen_win_info *) NULL)
669  {
670  tui_delete_win (generic_win->handle);
671  generic_win->handle = (WINDOW *) NULL;
672  generic_win->is_visible = FALSE;
673  }
674  if (win_info->detail.source_info.fullname)
675  {
676  xfree (win_info->detail.source_info.fullname);
677  win_info->detail.source_info.fullname = NULL;
678  }
679  generic_win = win_info->detail.source_info.execution_info;
680  if (generic_win != (struct tui_gen_win_info *) NULL)
681  {
682  tui_delete_win (generic_win->handle);
683  generic_win->handle = (WINDOW *) NULL;
684  generic_win->is_visible = FALSE;
685  }
686  break;
687  case DATA_WIN:
688  if (win_info->generic.content != NULL)
689  {
694  }
695  break;
696  default:
697  break;
698  }
699  if (win_info->generic.handle != (WINDOW *) NULL)
700  {
701  tui_delete_win (win_info->generic.handle);
702  win_info->generic.handle = (WINDOW *) NULL;
703  win_info->generic.is_visible = FALSE;
704  }
705 }
706 
707 
708 void
709 tui_free_window (struct tui_win_info *win_info)
710 {
711  struct tui_gen_win_info *generic_win;
712 
713  switch (win_info->generic.type)
714  {
715  case SRC_WIN:
716  case DISASSEM_WIN:
717  if (win_info->detail.source_info.fullname)
718  {
719  xfree (win_info->detail.source_info.fullname);
720  win_info->detail.source_info.fullname = NULL;
721  }
722  generic_win = win_info->detail.source_info.execution_info;
723  if (generic_win != (struct tui_gen_win_info *) NULL)
724  {
725  tui_delete_win (generic_win->handle);
726  generic_win->handle = (WINDOW *) NULL;
727  tui_free_win_content (generic_win);
728  }
729  break;
730  case DATA_WIN:
731  if (win_info->generic.content != NULL)
732  {
736  (tui_win_content) NULL;
741  (tui_win_content) NULL;
744  win_info->detail.data_display_info.display_regs = FALSE;
745  win_info->generic.content = NULL;
746  win_info->generic.content_size = 0;
747  }
748  break;
749  default:
750  break;
751  }
752  if (win_info->generic.handle != (WINDOW *) NULL)
753  {
754  tui_delete_win (win_info->generic.handle);
755  win_info->generic.handle = (WINDOW *) NULL;
756  tui_free_win_content (&win_info->generic);
757  }
758  if (win_info->generic.title)
759  xfree (win_info->generic.title);
760  xfree (win_info);
761 }
762 
763 
764 void
766 {
767  int i;
768 
769  for (i = 0; i < (tui_source_windows ())->count; i++)
770  {
771  struct tui_win_info *win_info = (tui_source_windows ())->list[i];
772 
773  if (win_info != NULL)
774  {
775  tui_free_win_content (&(win_info->generic));
777  }
778  }
779 }
780 
781 
782 void
784 {
785  if (win_info->content != NULL)
786  {
787  free_content ((tui_win_content) win_info->content,
788  win_info->content_size,
789  win_info->type);
790  win_info->content = NULL;
791  }
792  win_info->content_size = 0;
793 }
794 
795 
796 void
798  int content_size)
799 {
800  int i;
801 
802  /* Remember that data window content elements are of type struct
803  tui_gen_win_info *, each of which whose single element is a data
804  element. */
805  for (i = 0; i < content_size; i++)
806  {
807  struct tui_gen_win_info *generic_win
808  = &content[i]->which_element.data_window;
809 
810  if (generic_win != (struct tui_gen_win_info *) NULL)
811  {
812  tui_delete_win (generic_win->handle);
813  generic_win->handle = (WINDOW *) NULL;
814  generic_win->is_visible = FALSE;
815  }
816  }
817 }
818 
819 
820 void
822  int content_size)
823 {
824  int i;
825 
826  /* Remember that data window content elements are of type struct
827  tui_gen_win_info *, each of which whose single element is a data
828  element. */
829  for (i = 0; i < content_size; i++)
830  {
831  struct tui_gen_win_info *generic_win
832  = &content[i]->which_element.data_window;
833 
834  if (generic_win != (struct tui_gen_win_info *) NULL)
835  {
836  tui_delete_win (generic_win->handle);
837  generic_win->handle = (WINDOW *) NULL;
838  tui_free_win_content (generic_win);
839  }
840  }
841  free_content (content,
842  content_size,
843  DATA_WIN);
844 }
845 
846 
847 /**********************************
848 ** LOCAL STATIC FUNCTIONS **
849 **********************************/
850 
851 
852 static void
854  int content_size,
855  enum tui_win_type win_type)
856 {
857  if (content != (tui_win_content) NULL)
858  {
859  free_content_elements (content, content_size, win_type);
860  xfree (content);
861  }
862 }
863 
864 
865 /* free_content_elements().
866  */
867 static void
869  int content_size,
870  enum tui_win_type type)
871 {
872  if (content != (tui_win_content) NULL)
873  {
874  int i;
875 
876  if (type == SRC_WIN || type == DISASSEM_WIN)
877  {
878  /* Free whole source block. */
879  xfree (content[0]->which_element.source.line);
880  }
881  else
882  {
883  for (i = 0; i < content_size; i++)
884  {
885  struct tui_win_element *element;
886 
887  element = content[i];
888  if (element != (struct tui_win_element *) NULL)
889  {
890  switch (type)
891  {
892  case DATA_WIN:
893  xfree (element);
894  break;
895  case DATA_ITEM_WIN:
896  /* Note that data elements are not allocated in
897  a single block, but individually, as
898  needed. */
899  if (element->which_element.data.type != TUI_REGISTER)
900  xfree ((void *)element->which_element.data.name);
901  xfree (element->which_element.data.value);
902  xfree (element->which_element.data.content);
903  xfree (element);
904  break;
905  case CMD_WIN:
906  xfree (element->which_element.command.line);
907  break;
908  default:
909  break;
910  }
911  }
912  }
913  }
914  if (type != DATA_WIN && type != DATA_ITEM_WIN)
915  xfree (content[0]); /* Free the element block. */
916  }
917 }
int horizontal_offset
Definition: tui-data.h:255
void tui_clear_source_windows_detail(void)
Definition: tui-data.c:179
void tui_init_generic_part(struct tui_gen_win_info *win)
Definition: tui-data.c:453
void tui_set_term_height_to(int h)
Definition: tui-data.c:270
tui_win_content content
Definition: tui-data.h:47
static struct tui_win_info * src_win_list[2]
Definition: tui-data.c:41
struct tui_command_info command_info
Definition: tui-data.h:282
void tui_set_win_highlight(struct tui_win_info *win_info, int highlight)
Definition: tui-data.c:88
#define DATA_NAME
Definition: tui-data.h:65
struct tui_gen_win_info data_window
Definition: tui-data.h:223
int regs_column_count
Definition: tui-data.h:244
void tui_del_data_windows(tui_win_content content, int content_size)
Definition: tui-data.c:797
int tui_win_has_locator(struct tui_win_info *win_info)
Definition: tui-data.c:81
int viewport_height
Definition: tui-data.h:50
enum tui_win_type type
Definition: tui-data.h:43
struct tui_win_info * tui_win_list[MAX_MAJOR_WINDOWS]
Definition: tui-data.c:32
const char * tui_win_name(const struct tui_gen_win_info *win_info)
Definition: tui-data.c:404
int data_content_count
Definition: tui-data.h:241
int tui_term_height(void)
Definition: tui-data.c:262
void xfree(void *)
Definition: common-utils.c:97
tui_layout_type
Definition: tui-data.h:114
void tui_clear_win_detail(struct tui_win_info *win_info)
Definition: tui-data.c:201
void tui_initialize_static_data(void)
Definition: tui-data.c:432
tui_exec_info_content simple_string
Definition: tui-data.h:227
struct tui_line_or_address line_or_addr
Definition: tui-data.h:161
void tui_add_to_source_windows(struct tui_win_info *win_info)
Definition: tui-data.c:192
struct tui_gen_win_info * tui_alloc_generic_win_info(void)
Definition: tui-data.c:441
struct tui_win_info * tui_prev_win(struct tui_win_info *cur_win)
Definition: tui-data.c:346
tui_win_content regs_content
Definition: tui-data.h:242
struct tui_list * tui_source_windows(void)
Definition: tui-data.c:159
char * content
Definition: tui-data.h:176
static int win_resized
Definition: tui-data.c:49
void tui_free_data_content(tui_win_content content, int content_size)
Definition: tui-data.c:821
union tui_line_or_address::@171 u
static void init_win_info(struct tui_win_info *win_info)
Definition: tui-data.c:521
const char * name
Definition: tui-data.h:170
WINDOW * handle
Definition: tui-data.h:42
enum tui_line_or_address_kind loa
Definition: tui-data.h:142
void tui_delete_win(WINDOW *window)
char * title
Definition: tui-data.h:53
struct tui_win_info * tui_next_win(struct tui_win_info *cur_win)
Definition: tui-data.c:316
char full_name[MAX_LOCATOR_ELEMENT_LEN]
Definition: tui-data.h:196
struct tui_command_element command
Definition: tui-data.h:225
void tui_set_term_width_to(int w)
Definition: tui-data.c:286
static void free_content_elements(tui_win_content, int, enum tui_win_type)
Definition: tui-data.c:868
const char *const name
Definition: aarch64-tdep.c:68
struct tui_locator_element locator
Definition: tui-data.h:226
struct gdbarch * gdbarch
Definition: tui-data.h:262
int x
Definition: tui-data.h:31
struct tui_gen_win_info generic
Definition: tui-data.h:277
struct tui_source_info source_info
Definition: tui-data.h:280
int can_highlight
Definition: tui-data.h:286
Definition: tui.h:39
tui_win_content tui_alloc_content(int num_elements, enum tui_win_type type)
Definition: tui-data.c:577
CORE_ADDR addr
Definition: tui-data.h:199
struct tui_data_info data_display_info
Definition: tui-data.h:281
void * opaque
Definition: tui-data.h:283
struct tui_win_info * tui_win_with_focus(void)
Definition: tui-data.c:125
#define UNDEFINED_ITEM
Definition: tui-data.h:77
struct tui_line_or_address start_line_or_addr
Definition: tui-data.h:256
struct tui_gen_win_info * tui_locator_win_info_ptr(void)
Definition: tui-data.c:254
enum tui_data_type type
Definition: tui-data.h:173
static enum tui_layout_type current_layout
Definition: tui-data.c:37
Definition: gdbtypes.h:749
static struct tui_gen_win_info exec_info[2]
Definition: tui-data.c:40
static const char * type
Definition: language.c:103
static int startswith(const char *string, const char *pattern)
Definition: common-utils.h:75
int is_highlighted
Definition: tui-data.h:287
static int term_height
Definition: tui-data.c:38
struct tui_layout_def * tui_layout_def(void)
Definition: tui-data.c:117
void tui_set_current_layout_to(enum tui_layout_type new_layout)
Definition: tui-data.c:302
tui_win_content data_content
Definition: tui-data.h:240
void * xmalloc(YYSIZE_T)
Definition: tui.h:42
void tui_free_all_source_wins_content(void)
Definition: tui-data.c:765
void tui_del_window(struct tui_win_info *win_info)
Definition: tui-data.c:659
tui_win_type
Definition: tui.h:37
struct tui_win_info ** list
Definition: tui-data.h:108
void tui_clear_source_windows(void)
Definition: tui-data.c:169
void tui_free_window(struct tui_win_info *win_info)
Definition: tui-data.c:709
static struct tui_gen_win_info _locator
Definition: tui-data.c:39
void tui_set_win_resized_to(int resized)
Definition: tui-data.c:109
#define SRC_NAME
Definition: tui-data.h:63
union tui_which_element which_element
Definition: tui-data.h:233
int y
Definition: tui-data.h:31
int content_in_use
Definition: tui-data.h:49
static int default_tab_len
Definition: tui-data.c:43
static struct tui_list source_windows
Definition: tui-data.c:42
struct tui_win_info * tui_alloc_win_info(enum tui_win_type type)
Definition: tui-data.c:560
struct tui_win_element ** tui_win_content
Definition: tui-data.h:37
static void free_content(tui_win_content, int, enum tui_win_type)
Definition: tui-data.c:853
int tui_add_content_elements(struct tui_gen_win_info *win_info, int num_elements)
Definition: tui-data.c:623
int last_visible_line
Definition: tui-data.h:51
struct tui_gen_win_info * tui_disassem_exec_info_win_ptr(void)
Definition: tui-data.c:245
struct tui_gen_win_info * execution_info
Definition: tui-data.h:254
int tui_default_tab_len(void)
Definition: tui-data.c:141
void tui_set_win_with_focus(struct tui_win_info *win_info)
Definition: tui-data.c:133
struct tui_point origin
Definition: tui-data.h:46
int tui_term_width(void)
Definition: tui-data.c:278
struct tui_win_info * tui_partial_win_by_name(char *name)
Definition: tui-data.c:375
int count
Definition: tui-data.h:109
static struct tui_win_info * win_with_focus
Definition: tui-data.c:44
int tui_win_is_source_type(enum tui_win_type win_type)
Definition: tui-data.c:69
static void init_content_element(struct tui_win_element *element, enum tui_win_type type)
Definition: tui-data.c:473
union tui_win_info::@172 detail
#define DEFAULT_TAB_LEN
Definition: tui-data.h:57
int display_regs
Definition: tui-data.h:245
#define CMD_NAME
Definition: tui-data.h:64
#define DISASSEM_NAME
Definition: tui-data.h:66
Definition: tui.h:41
void tui_free_win_content(struct tui_gen_win_info *win_info)
Definition: tui-data.c:783
struct tui_gen_win_info * tui_source_exec_info_win_ptr(void)
Definition: tui-data.c:237
int tui_win_is_auxillary(enum tui_win_type win_type)
Definition: tui-data.c:75
struct tui_data_element data
Definition: tui-data.h:224
int tui_win_resized(void)
Definition: tui-data.c:101
struct tui_source_element source
Definition: tui-data.h:222
struct reggroup * current_group
Definition: tui-data.h:246
void tui_set_default_tab_len(int len)
Definition: tui-data.c:149
static int term_width
Definition: tui-data.c:38
CORE_ADDR addr
Definition: tui-data.h:146
char * fullname
Definition: tui-data.h:259
static struct tui_layout_def layout_def
Definition: tui-data.c:45
char proc_name[MAX_LOCATOR_ELEMENT_LEN]
Definition: tui-data.h:197
int regs_content_count
Definition: tui-data.h:243
const ULONGEST const LONGEST len
Definition: target.h:309
enum tui_layout_type tui_current_layout(void)
Definition: tui-data.c:294