Rizin
unix-like reverse engineering framework and cli tools
windows_message.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2019 GustavoLCR <gugulcr@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #include <rz_windows.h>
5 #include "windows_message.h"
6 
7 static char *msg_types_arr[] = {
8  "WM_NULL=0x0000",
9  "WM_CREATE=0x0001",
10  "WM_DESTROY=0x0002",
11  "WM_MOVE=0x0003",
12  "WM_SIZE=0x0005",
13  "WM_ACTIVATE=0x0006",
14  "WM_SETFOCUS=0x0007",
15  "WM_KILLFOCUS=0x0008",
16  "WM_ENABLE=0x000A",
17  "WM_SETREDRAW=0x000B",
18  "WM_SETTEXT=0x000C",
19  "WM_GETTEXT=0x000D",
20  "WM_GETTEXTLENGTH=0x000E",
21  "WM_PAINT=0x000F",
22  "WM_CLOSE=0x0010",
23  "WM_QUERYENDSESSION=0x0011",
24  "WM_QUIT=0x0012",
25  "WM_QUERYOPEN=0x0013",
26  "WM_ERASEBKGND=0x0014",
27  "WM_SYSCOLORCHANGE=0x0015",
28  "WM_ENDSESSION=0x0016",
29  "WM_SHOWWINDOW=0x0018",
30  "WM_WININICHANGE=0x001A",
31  "WM_DEVMODECHANGE=0x001B",
32  "WM_ACTIVATEAPP=0x001C",
33  "WM_FONTCHANGE=0x001D",
34  "WM_TIMECHANGE=0x001E",
35  "WM_CANCELMODE=0x001F",
36  "WM_SETCURSOR=0x0020",
37  "WM_MOUSEACTIVATE=0x0021",
38  "WM_CHILDACTIVATE=0x0022",
39  "WM_QUEUESYNC=0x0023",
40  "WM_GETMINMAXINFO=0x0024",
41  "WM_PAINTICON=0x0026",
42  "WM_ICONERASEBKGND=0x0027",
43  "WM_NEXTDLGCTL=0x0028",
44  "WM_SPOOLERSTATUS=0x002A",
45  "WM_DRAWITEM=0x002B",
46  "WM_MEASUREITEM=0x002C",
47  "WM_DELETEITEM=0x002D",
48  "WM_VKEYTOITEM=0x002E",
49  "WM_CHARTOITEM=0x002F",
50  "WM_SETFONT=0x0030",
51  "WM_GETFONT=0x0031",
52  "WM_SETHOTKEY=0x0032",
53  "WM_GETHOTKEY=0x0033",
54  "WM_QUERYDRAGICON=0x0037",
55  "WM_COMPAREITEM=0x0039",
56  "WM_GETOBJECT=0x003D",
57  "WM_COMPACTING=0x0041",
58  "WM_COMMNOTIFY=0x0044",
59  "WM_WINDOWPOSCHANGING=0x0046",
60  "WM_WINDOWPOSCHANGED=0x0047",
61  "WM_POWER=0x0048",
62  "WM_COPYDATA=0x004A",
63  "WM_CANCELJOURNAL=0x004B",
64  "WM_NOTIFY=0x004E",
65  "WM_INPUTLANGCHANGEREQUEST=0x0050",
66  "WM_INPUTLANGCHANGE=0x0051",
67  "WM_TCARD=0x0052",
68  "WM_HELP=0x0053",
69  "WM_USERCHANGED=0x0054",
70  "WM_NOTIFYFORMAT=0x0055",
71  "WM_CONTEXTMENU=0x007B",
72  "WM_STYLECHANGING=0x007C",
73  "WM_STYLECHANGED=0x007D",
74  "WM_DISPLAYCHANGE=0x007E",
75  "WM_GETICON=0x007F",
76  "WM_SETICON=0x0080",
77  "WM_NCCREATE=0x0081",
78  "WM_NCDESTROY=0x0082",
79  "WM_NCCALCSIZE=0x0083",
80  "WM_NCHITTEST=0x0084",
81  "WM_NCPAINT=0x0085",
82  "WM_NCACTIVATE=0x0086",
83  "WM_GETDLGCODE=0x0087",
84  "WM_SYNCPAINT=0x0088",
85  "WM_NCMOUSEMOVE=0x00A0",
86  "WM_NCLBUTTONDOWN=0x00A1",
87  "WM_NCLBUTTONUP=0x00A2",
88  "WM_NCLBUTTONDBLCLK=0x00A3",
89  "WM_NCRBUTTONDOWN=0x00A4",
90  "WM_NCRBUTTONUP=0x00A5",
91  "WM_NCRBUTTONDBLCLK=0x00A6",
92  "WM_NCMBUTTONDOWN=0x00A7",
93  "WM_NCMBUTTONUP=0x00A8",
94  "WM_NCMBUTTONDBLCLK=0x00A9",
95  "WM_NCXBUTTONDOWN=0x00AB",
96  "WM_NCXBUTTONUP=0x00AC",
97  "WM_NCXBUTTONDBLCLK=0x00AD",
98  "WM_INPUT=0x00FF",
99  "WM_KEYFIRST=0x0100",
100  "WM_KEYDOWN=0x0100",
101  "WM_KEYUP=0x0101",
102  "WM_CHAR=0x0102",
103  "WM_DEADCHAR=0x0103",
104  "WM_SYSKEYDOWN=0x0104",
105  "WM_SYSKEYUP=0x0105",
106  "WM_SYSCHAR=0x0106",
107  "WM_SYSDEADCHAR=0x0107",
108  "WM_UNICHAR=0x0109",
109  "WM_KEYLAST=0x0109",
110  "WM_KEYLAST=0x0108",
111  "WM_INITDIALOG=0x0110",
112  "WM_COMMAND=0x0111",
113  "WM_SYSCOMMAND=0x0112",
114  "WM_TIMER=0x0113",
115  "WM_HSCROLL=0x0114",
116  "WM_VSCROLL=0x0115",
117  "WM_INITMENU=0x0116",
118  "WM_INITMENUPOPUP=0x0117",
119  "WM_GESTURE=0x0119",
120  "WM_GESTURENOTIFY=0x011A",
121  "WM_MENUSELECT=0x011F",
122  "WM_MENUCHAR=0x0120",
123  "WM_ENTERIDLE=0x0121",
124  "WM_MENURBUTTONUP=0x0122",
125  "WM_MENUDRAG=0x0123",
126  "WM_MENUGETOBJECT=0x0124",
127  "WM_UNINITMENUPOPUP=0x0125",
128  "WM_MENUCOMMAND=0x0126",
129  "WM_CHANGEUISTATE=0x0127",
130  "WM_UPDATEUISTATE=0x0128",
131  "WM_QUERYUISTATE=0x0129",
132  "WM_CTLCOLORMSGBOX=0x0132",
133  "WM_CTLCOLOREDIT=0x0133",
134  "WM_CTLCOLORLISTBOX=0x0134",
135  "WM_CTLCOLORBTN=0x0135",
136  "WM_CTLCOLORDLG=0x0136",
137  "WM_CTLCOLORSCROLLBAR=0x0137",
138  "WM_CTLCOLORSTATIC=0x0138",
139  "WM_MOUSEFIRST=0x0200",
140  "WM_MOUSEMOVE=0x0200",
141  "WM_LBUTTONDOWN=0x0201",
142  "WM_LBUTTONUP=0x0202",
143  "WM_LBUTTONDBLCLK=0x0203",
144  "WM_RBUTTONDOWN=0x0204",
145  "WM_RBUTTONUP=0x0205",
146  "WM_RBUTTONDBLCLK=0x0206",
147  "WM_MBUTTONDOWN=0x0207",
148  "WM_MBUTTONUP=0x0208",
149  "WM_MBUTTONDBLCLK=0x0209",
150  "WM_MOUSEWHEEL=0x020A",
151  "WM_XBUTTONDOWN=0x020B",
152  "WM_XBUTTONUP=0x020C",
153  "WM_XBUTTONDBLCLK=0x020D",
154  "WM_MOUSEHWHEEL=0x020E",
155  "WM_MOUSELAST=0x020E",
156  "WM_MOUSELAST=0x020D",
157  "WM_MOUSELAST=0x020A",
158  "WM_MOUSELAST=0x0209",
159  "WM_PARENTNOTIFY=0x0210",
160  "WM_ENTERMENULOOP=0x0211",
161  "WM_EXITMENULOOP=0x0212",
162  "WM_NEXTMENU=0x0213",
163  "WM_SIZING=0x0214",
164  "WM_CAPTURECHANGED=0x0215",
165  "WM_MOVING=0x0216",
166  "WM_POWERBROADCAST=0x0218",
167  "WM_DEVICECHANGE=0x0219",
168  "WM_MDICREATE=0x0220",
169  "WM_MDIDESTROY=0x0221",
170  "WM_MDIACTIVATE=0x0222",
171  "WM_MDIRESTORE=0x0223",
172  "WM_MDINEXT=0x0224",
173  "WM_MDIMAXIMIZE=0x0225",
174  "WM_MDITILE=0x0226",
175  "WM_MDICASCADE=0x0227",
176  "WM_MDIICONARRANGE=0x0228",
177  "WM_MDIGETACTIVE=0x0229",
178  "WM_MDISETMENU=0x0230",
179  "WM_ENTERSIZEMOVE=0x0231",
180  "WM_EXITSIZEMOVE=0x0232",
181  "WM_DROPFILES=0x0233",
182  "WM_MDIREFRESHMENU=0x0234",
183  "WM_POINTERDEVICECHANGE=0x238",
184  "WM_POINTERDEVICEINRANGE=0x239",
185  "WM_POINTERDEVICEOUTOFRANGE=0x23A",
186  "WM_TOUCH=0x0240",
187  "WM_NCPOINTERUPDATE=0x0241",
188  "WM_NCPOINTERDOWN=0x0242",
189  "WM_NCPOINTERUP=0x0243",
190  "WM_POINTERUPDATE=0x0245",
191  "WM_POINTERDOWN=0x0246",
192  "WM_POINTERUP=0x0247",
193  "WM_POINTERENTER=0x0249",
194  "WM_POINTERLEAVE=0x024A",
195  "WM_POINTERACTIVATE=0x024B",
196  "WM_POINTERCAPTURECHANGED=0x024C",
197  "WM_TOUCHHITTESTING=0x024D",
198  "WM_POINTERWHEEL=0x024E",
199  "WM_POINTERHWHEEL=0x024F",
200  "WM_POINTERROUTEDTO=0x0251",
201  "WM_POINTERROUTEDAWAY=0x0252",
202  "WM_POINTERROUTEDRELEASED=0x0253",
203  "WM_MOUSEHOVER=0x02A1",
204  "WM_MOUSELEAVE=0x02A3",
205  "WM_NCMOUSEHOVER=0x02A0",
206  "WM_NCMOUSELEAVE=0x02A2",
207  "WM_DPICHANGED=0x02E0",
208  "WM_GETDPISCALEDSIZE=0x02E4",
209  "WM_CUT=0x0300",
210  "WM_COPY=0x0301",
211  "WM_PASTE=0x0302",
212  "WM_CLEAR=0x0303",
213  "WM_UNDO=0x0304",
214  "WM_RENDERFORMAT=0x0305",
215  "WM_RENDERALLFORMATS=0x0306",
216  "WM_DESTROYCLIPBOARD=0x0307",
217  "WM_DRAWCLIPBOARD=0x0308",
218  "WM_PAINTCLIPBOARD=0x0309",
219  "WM_VSCROLLCLIPBOARD=0x030A",
220  "WM_SIZECLIPBOARD=0x030B",
221  "WM_ASKCBFORMATNAME=0x030C",
222  "WM_CHANGECBCHAIN=0x030D",
223  "WM_HSCROLLCLIPBOARD=0x030E",
224  "WM_QUERYNEWPALETTE=0x030F",
225  "WM_PALETTEISCHANGING=0x0310",
226  "WM_PALETTECHANGED=0x0311",
227  "WM_HOTKEY=0x0312",
228  "WM_PRINT=0x0317",
229  "WM_PRINTCLIENT=0x0318",
230  "WM_APPCOMMAND=0x0319",
231  "WM_THEMECHANGED=0x031A",
232  "WM_CLIPBOARDUPDATE=0x031D",
233  "WM_DWMCOMPOSITIONCHANGED=0x031E",
234  "WM_DWMNCRENDERINGCHANGED=0x031F",
235  "WM_DWMCOLORIZATIONCOLORCHANGED=0x0320",
236  "WM_DWMWINDOWMAXIMIZEDCHANGE=0x0321",
237  "WM_DWMSENDICONICTHUMBNAIL=0x0323",
238  "WM_DWMSENDICONICLIVEPREVIEWBITMAP=0x0326",
239  "WM_GETTITLEBARINFOEX=0x033F",
240  "WM_HANDHELDFIRST=0x0358",
241  "WM_HANDHELDLAST=0x035F",
242  "WM_AFXFIRST=0x0360",
243  "WM_AFXLAST=0x037F",
244  "WM_PENWINFIRST=0x0380",
245  "WM_PENWINLAST=0x038F",
246  "WM_APP=0x8000",
247  "WM_USER=0x0400",
248  NULL
249 };
250 
251 typedef struct _window {
254  HWND h;
255  char *name;
258 
259 void free_window(void *ptr) {
260  window *win = ptr;
261  free(win->name);
262  free(win);
263 }
264 
267  window *win = RZ_NEW0(window);
268  if (!win) {
269  return NULL;
270  }
271  win->h = hwnd;
272  win->tid = GetWindowThreadProcessId(hwnd, &win->pid);
273  win->proc = GetClassLongPtrW(hwnd, GCLP_WNDPROC);
274  const size_t sz = MAX_CLASS_NAME * sizeof(WCHAR);
275  wchar_t *tmp = malloc(sz);
276  if (!tmp) {
277  free(win);
278  return NULL;
279  }
280  GetClassNameW(hwnd, tmp, MAX_CLASS_NAME);
281  win->name = rz_utf16_to_utf8(tmp);
282  free(tmp);
283  if (!win->name) {
284  win->name = strdup("");
285  }
286  return win;
287 }
288 
290  RzTable *tbl = rz_table_new();
291  if (!tbl) {
292  return NULL;
293  }
294  rz_table_add_column(tbl, rz_table_type("number"), "Handle", ST32_MAX);
295  rz_table_add_column(tbl, rz_table_type("number"), "PID", ST32_MAX);
296  rz_table_add_column(tbl, rz_table_type("number"), "TID", ST32_MAX);
297  rz_table_add_column(tbl, rz_table_type("string"), "Class Name", ST32_MAX);
298  return tbl;
299 }
300 
301 static void add_window_to_table(RzTable *tbl, window *win) {
302  rz_return_if_fail(tbl && win);
303  char *handle = rz_str_newf("0x%08" PFMT64x "", (ut64)win->h);
304  char *pid = rz_str_newf("%lu", win->pid);
305  char *tid = rz_str_newf("%lu", win->tid);
306  rz_table_add_row(tbl, handle, pid, tid, win->name, NULL);
307  free(handle);
308  free(tid);
309  free(pid);
310 }
311 
313  while (!rz_cons_yesno('y', "Move cursor to the window to be identified. Ready? (Y/n)"))
314  ;
315  POINT p;
316  if (!GetCursorPos(&p)) {
317  rz_sys_perror("GetCursorPos");
318  }
319  HWND hwnd = WindowFromPoint(p);
320  window *win = NULL;
321  if (hwnd) {
322  if (rz_cons_yesno('y', "Try to get the child? (Y/n)")) {
323  HWND child = ChildWindowFromPoint(hwnd, p);
324  hwnd = child ? child : hwnd;
325  }
326  win = window_from_handle(hwnd);
327  } else {
328  eprintf("No window found\n");
329  return;
330  }
331  if (!win) {
332  eprintf("Error trying to get information from 0x%08" PFMT64x "\n", (ut64)hwnd);
333  return;
334  }
335  RzTable *tbl = create_window_table();
336  if (!tbl) {
337  return;
338  }
339  add_window_to_table(tbl, win);
340  char *tbl_str = rz_table_tofancystring(tbl);
341  rz_cons_print(tbl_str);
342  free(tbl_str);
343  rz_table_free(tbl);
344 }
345 
346 static BOOL CALLBACK enum_childs(
347  _In_ HWND hwnd,
348  _In_ LPARAM lParam) {
349  RzList *windows = (RzList *)lParam;
350  window *win = window_from_handle(hwnd);
351  if (!win) {
352  return false;
353  }
354  rz_list_push(windows, win);
355  return true;
356 }
357 
360  HWND hCurWnd = NULL;
361  do {
362  hCurWnd = FindWindowEx(NULL, hCurWnd, NULL, NULL);
363  DWORD dwProcessID = 0;
364  GetWindowThreadProcessId(hCurWnd, &dwProcessID);
365  if (dbg->pid == dwProcessID) {
366  EnumChildWindows(hCurWnd, enum_childs, (LPARAM)windows);
367  window *win = window_from_handle(hCurWnd);
368  if (!win) {
369  rz_list_free(windows);
370  return NULL;
371  }
372  rz_list_push(windows, win);
373  }
374  } while (hCurWnd != NULL);
375  return windows;
376 }
377 
379  RzList *modlist = rz_debug_modules_list(dbg);
380  RzListIter *it;
381  RzDebugMap *mod;
382  bool found = false;
383  rz_list_foreach (modlist, it, mod) {
384  if (!strnicmp(mod->name, "user32.dll", sizeof("user32.dll"))) {
385  found = true;
386  break;
387  }
388  }
389  if (!found) {
390  return 0;
391  }
392  char *res = dbg->corebind.cmdstr(dbg->corebind.core, "f~DispatchMessageW");
393  if (!*res) {
394  free(res);
395  return 0;
396  }
397  char *line = strtok(res, "\n");
398  ut64 offset = 0;
399  do {
400  char *sym = strrchr(line, ' ');
401  if (sym && rz_str_startswith(sym + 1, "sym.imp")) {
403  dbg->iob.read_at(dbg->iob.io, offset, (ut8 *)&offset, sizeof(offset));
404  break;
405  }
406  } while ((line = strtok(NULL, "\n")));
407  free(res);
408  return offset;
409 }
410 
411 static void init_msg_types(Sdb **msg_types) {
412  *msg_types = sdb_new0();
413  int i;
414  char *cur_type;
415  for (i = 0; (cur_type = msg_types_arr[i]); i++) {
416  sdb_query(*msg_types, cur_type);
417  }
418 }
419 
420 static DWORD get_msg_type(char *name) {
421  static Sdb *msg_types = NULL;
422  if (!msg_types) {
423  init_msg_types(&msg_types);
424  }
425  ut32 found;
426  const char *type_str = sdb_const_get(msg_types, name, &found);
427  if (found) {
428  int type = rz_num_get(NULL, type_str);
429  return type;
430  }
431  return 0;
432 }
433 
434 static void print_windows(RzDebug *dbg, RzList *windows) {
435  RzTable *tbl = create_window_table();
436  if (!tbl) {
437  return;
438  }
439  RzListIter *it;
440  window *win;
441  rz_list_foreach (windows, it, win) {
442  add_window_to_table(tbl, win);
443  }
444  char *t = rz_table_tostring(tbl);
445  dbg->cb_printf(t);
446  free(t);
447  rz_table_free(tbl);
448 }
449 
451  RzList *windows = get_windows(dbg);
452  if (windows) {
453  if (!windows->length) {
454  dbg->cb_printf("No windows for this process.\n");
455  return;
456  }
457  print_windows(dbg, windows);
458  }
459  rz_list_free(windows);
460 }
461 
462 RZ_API bool rz_w32_add_winmsg_breakpoint(RzDebug *dbg, const char *msg_name, const char *window_id) {
463  rz_return_val_if_fail(dbg && msg_name, false);
464  char *name = strdup(msg_name);
465  rz_str_trim(name);
466 
468  if (!type) {
469  free(name);
470  return false;
471  }
472  ut64 offset = 0;
473  if (window_id) {
474  RzList *windows = get_windows(dbg);
475  if (windows && !windows->length) {
476  dbg->cb_printf("No windows for this process.\n");
477  }
478  ut64 win_h = rz_num_math(NULL, window_id);
479  RzListIter *it;
480  window *win;
481  rz_list_foreach (windows, it, win) {
482  if ((ut64)win->h == win_h || !strnicmp(win->name, window_id, strlen(window_id))) {
483  offset = win->proc;
484  break;
485  }
486  }
487  if (!offset) {
488  dbg->cb_printf("Window not found, try these:\n");
489  print_windows(dbg, windows);
490  }
491  rz_list_free(windows);
492  } else {
494  }
495  if (!offset) {
496  free(name);
497  return false;
498  }
499  RzBreakpointItem *b = rz_debug_bp_add(dbg, offset, 0, 0, 0, NULL, 0);
500  if (!b) {
501  free(name);
502  return false;
503  }
504  char *cond;
505  if (window_id) {
506  char *reg;
507  if (!strcmp(dbg->arch, "arm")) {
508  if (dbg->bits == RZ_SYS_BITS_64) {
509  reg = "x1";
510  } else {
511  reg = "r1";
512  }
513  } else {
514  reg = "edx";
515  }
516  b->cond = rz_str_newf("?q `ae %s,%d,-`", reg, type);
517  } else {
518  char *reg;
519  if (!strcmp(dbg->arch, "arm")) {
520  if (dbg->bits == RZ_SYS_BITS_64) {
521  reg = "x0";
522  } else {
523  reg = "r0";
524  }
525  } else {
526  if (dbg->bits == RZ_SYS_BITS_64) {
527  reg = "rcx";
528  } else {
529  reg = "ecx";
530  }
531  }
532  b->cond = rz_str_newf("?q `ae %lu,%s,%d,+,[4],-`", type, reg, dbg->bits);
533  }
534  free(name);
535  return true;
536 }
lzma_index ** i
Definition: index.h:629
static mcore_handle handle
Definition: asm_mcore.c:8
#define RZ_API
#define NULL
Definition: cris-opc.c:27
int mod(int a, int b)
Definition: crypto_rot.c:8
uint32_t ut32
RzDebug * dbg
Definition: desil.c:30
RZ_API RzList * rz_debug_modules_list(RzDebug *dbg)
Definition: dmap.c:29
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
RZ_API const KEY_TYPE bool * found
Definition: ht_inc.h:130
RZ_API bool rz_cons_yesno(int def, const char *fmt,...)
Definition: input.c:666
voidpf uLong offset
Definition: ioapi.h:144
#define reg(n)
uint8_t ut8
Definition: lh5801.h:11
void * p
Definition: libc.cpp:67
RZ_API RZ_BORROW RzBreakpointItem * rz_debug_bp_add(RZ_NONNULL RzDebug *dbg, ut64 addr, int hw, bool watch, int rw, RZ_NULLABLE const char *module, st64 m_delta)
Definition: debug.c:270
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
Definition: list.c:248
RZ_API RZ_BORROW RzListIter * rz_list_push(RZ_NONNULL RzList *list, void *item)
Alias for rz_list_append.
Definition: list.c:60
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
Definition: list.c:137
RZ_API int sdb_query(Sdb *s, const char *cmd)
Definition: query.c:785
void * malloc(size_t size)
Definition: malloc.c:123
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc pid
Definition: sflib.h:64
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
int type
Definition: mipsasm.c:17
line
Definition: setup.py:34
#define eprintf(x, y...)
Definition: rlcc.c:7
#define rz_return_if_fail(expr)
Definition: rz_assert.h:100
#define rz_return_val_if_fail(expr, val)
Definition: rz_assert.h:108
void(* RzListFree)(void *ptr)
Definition: rz_list.h:11
RZ_API ut64 rz_num_get(RzNum *num, const char *str)
Definition: unum.c:172
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
Definition: unum.c:456
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API void rz_str_trim(RZ_NONNULL RZ_INOUT char *str)
Removes whitespace characters (space, tab, newline etc.) from the beginning and end of a string.
Definition: str_trim.c:190
RZ_API bool rz_str_startswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string starts with a specifc sequence of characters (case sensitive)
Definition: str.c:3286
@ RZ_SYS_BITS_64
Definition: rz_sys.h:21
RZ_API void rz_table_add_column(RzTable *t, RzTableColumnType *type, const char *name, int maxWidth)
Definition: table.c:134
RZ_API void rz_table_free(RzTable *t)
Definition: table.c:114
RZ_API void rz_table_add_row(RZ_NONNULL RzTable *t, const char *name,...)
Definition: table.c:329
RZ_API char * rz_table_tostring(RzTable *t)
Definition: table.c:510
RZ_API RzTable * rz_table_new(void)
Definition: table.c:103
RZ_API RZ_OWN char * rz_table_tofancystring(RZ_NONNULL RzTable *t)
Convert the content of RzTable to string.
Definition: table.c:404
RZ_API RzTableColumnType * rz_table_type(const char *name)
Definition: table.c:24
#define rz_sys_perror(x)
Definition: rz_types.h:336
#define RZ_NEW0(x)
Definition: rz_types.h:284
#define PFMT64x
Definition: rz_types.h:393
#define ST32_MAX
Definition: rz_types_base.h:97
RZ_API Sdb * sdb_new0(void)
Definition: sdb.c:43
RZ_API const char * sdb_const_get(Sdb *s, const char *key, ut32 *cas)
Definition: sdb.c:279
#define b(i)
Definition: sha256.c:42
#define cond(bop, top, mask, flags)
char * name
Definition: z80asm.h:102
RzCoreCmdStr cmdstr
Definition: rz_bind.h:34
void * core
Definition: rz_bind.h:31
RzCoreBind corebind
Definition: rz_debug.h:314
PrintfCallback cb_printf
Definition: rz_debug.h:292
char * arch
Definition: rz_debug.h:242
int bits
Definition: rz_debug.h:243
RzIOBind iob
Definition: rz_debug.h:293
RzIOReadAt read_at
Definition: rz_io.h:240
RzIO * io
Definition: rz_io.h:232
ut32 length
Definition: rz_list.h:22
Definition: sdb.h:63
DWORD * HANDLE
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
DWORD
static BOOL CALLBACK enum_childs(_In_ HWND hwnd, _In_ LPARAM lParam)
RZ_API void rz_w32_identify_window(void)
static DWORD get_msg_type(char *name)
static void init_msg_types(Sdb **msg_types)
static RzList * get_windows(RzDebug *dbg)
RZ_API bool rz_w32_add_winmsg_breakpoint(RzDebug *dbg, const char *msg_name, const char *window_id)
RZ_API void rz_w32_print_windows(RzDebug *dbg)
static void print_windows(RzDebug *dbg, RzList *windows)
static window * window_from_handle(HANDLE hwnd)
struct _window window
static char * msg_types_arr[]
static void add_window_to_table(RzTable *tbl, window *win)
static ut64 get_dispatchmessage_offset(RzDebug *dbg)
void free_window(void *ptr)
static RzTable * create_window_table(void)