summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/gdb/mswin/gui.h
blob: 7036377dd2bb76057fad29891cce40a803fb2528 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// gui.h : main header file for the GUI application
//

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CGuiApp:
// See gui.cpp for the implementation of this class
//

class CGuiApp : public CWinApp
{
 private:
  virtual BOOL InitInstance();
  virtual BOOL ExitInstance();
  virtual BOOL PreTranslateMessage(MSG* pMsg);


 public:
  UINT m_uiMyListClipFormat;


  void raisekids(CMultiDocTemplate *);
  void newwin(CMultiDocTemplate*);

 public:
  static void SyncRegs();
  void sync_bpts();
  class CMultiDocTemplate* m_CmdLogTemplate;
  class CMultiDocTemplate* m_srcTemplate;
  class CMultiDocTemplate* m_expTemplate;
  class CMultiDocTemplate* m_infoTemplate;
  class CMultiDocTemplate* m_cmdTemplate;
  class CMultiDocTemplate* m_IOLogTemplate;
  class CMultiDocTemplate* m_regTemplate;
  class CMultiDocTemplate* m_srcsTemplate;
  class CMultiDocTemplate* m_bptTemplate;
  class CMultiDocTemplate* m_asmTemplate;	
  class CMultiDocTemplate* m_localTemplate;	
  class CMultiDocTemplate* m_srcbrowserTemplate;	
  class CMultiDocTemplate* m_watchTemplate;	

//  class CMultiDocTemplate *m_memTemplate;



  int gotkid(CMultiDocTemplate *p);
  CGuiApp();
  void Command(const char *command);

  void SetInterestingLine(int line);
  void SetInterestingAddr(  CORE_ADDR addr);
  void InsertBreakpoint(struct symtab *tab, int line);
  // Overrides
  // ClassWizard generated virtual function overrides
  //{{AFX_VIRTUAL(CGuiApp)
public:
  virtual BOOL OnIdle(LONG lCount);
  //}}AFX_VIRTUAL
  
  // Implementation
  
  //{{AFX_MSG(CGuiApp)

  afx_msg void OnUpdateShowAsm(CCmdUI* pCmdUI);
  afx_msg void OnShowAsm();

  afx_msg void OnUpdateShowSource(CCmdUI* pCmdUI);
  afx_msg void OnShowSource();

  afx_msg void OnUpdateShowBpts(CCmdUI* pCmdUI);
  afx_msg void OnShowBpts();

  afx_msg void OnUpdateShowLine(CCmdUI* pCmdUI);
  afx_msg void OnShowLine();

//  afx_msg void OnNewMemwin();
//  afx_msg void OnUpdateNewMemwin(CCmdUI* pCmdUI);


  afx_msg void OnAppAbout();
  afx_msg void OnRegister();
  afx_msg void OnNewCmdwin();
  afx_msg void OnUpdateNewCmdwin(CCmdUI* pCmdUI);
  afx_msg void OnNewIOLogWin();
  afx_msg void OnUpdateNewIOLogWin(CCmdUI* pCmdUI);
  afx_msg void OnUpdateBptWin(CCmdUI* pCmdUI);
  afx_msg void OnNewExpressionwin();
  afx_msg void OnNewSrcwin();
  afx_msg void OnNewRegwin();
  afx_msg void OnUpdateNewRegwin(CCmdUI* pCmdUI);
  afx_msg void OnNewBptwin();
  afx_msg void OnNewSrcBrowserWin();
  afx_msg void OnNewLocalWin();
  afx_msg void OnUpdateNewLocalWin(CCmdUI* pCmdUI);
  afx_msg void OnUpdateExpressionwin(CCmdUI* pCmdUI);
  afx_msg void OnUpdateNeedExec(CCmdUI* pCmdUI);
  
  afx_msg void OnUpdateNewSrcBrowserWin(CCmdUI* pCmdUI);
  afx_msg void OnUpdateNewSrcwin(CCmdUI* pCmdUI);
  afx_msg void OnHelpIndex();
  afx_msg void OnHelp();
  //}}AFX_MSG
  DECLARE_MESSAGE_MAP()
  };


/////////////////////////////////////////////////////////////////////////////
void theApp_sync_pc();
void theApp_show_at(CORE_ADDR pc);
void theApp_show_file(const char *);
void theApp_show_with_symtab(class CSymtab *);
void theApp_show_function(const char *, CORE_ADDR, CORE_ADDR);

class CGlobalOptions {
public:
  int always_create;
  static void Initialize();
  static void Terminate();
};

extern CGlobalOptions global_options;



class CSrcState 
{
public:
  BOOL	addresses ;
  BOOL 	breakpoint_ok;
  BOOL	disassembly;
  BOOL	instruction_data;
  BOOL	linenumbers ;
  BOOL 	source ;
public:
  CSrcState();
};
void props();

void redraw_allwins(CMultiDocTemplate *p);


void load_where(CFrameWnd *p, const char *);
void save_where(CFrameWnd *p, const char *);

void string_command (const CString &x);

extern "C" {
int mswin_query (const char*, va_list);
}