This file is indexed.

/usr/share/doc/wine-doc/html/winedev/dbg-others.htm is in wine-doc 1.0.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Other debuggers</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Wine Developer's Guide"
HREF="index.htm"><LINK
REL="UP"
TITLE="Debugging Wine"
HREF="debugger.htm"><LINK
REL="PREVIOUS"
TITLE="WineDbg Command Reference"
HREF="dbg-commands.htm"><LINK
REL="NEXT"
TITLE="Debug Logging"
HREF="debugging.htm"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="winedoc.css"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Wine Developer's Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="dbg-commands.htm"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 1. Debugging Wine</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="debugging.htm"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="DBG-OTHERS"
>1.8. Other debuggers</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN977"
>1.8.1. GDB mode</A
></H2
><P
>	  WineDbg can act as a remote monitor for GDB.  This allows to
	  use all the power of GDB, but while debugging wine and/or
	  any Win32 application.  To enable this mode, just add
	  <CODE
CLASS="PARAMETER"
>--gdb</CODE
> to winedbg command line.  You'll
	  end up on a GDB prompt.  You'll have to use the GDB commands
	  (not WineDbg's).
	</P
><P
>	  However, some limitation in GDB while debugging wine (see
	  below) don't appear in this mode:
	  <P
></P
><UL
><LI
><P
>		GDB will correctly present Win32 thread
		information and breakpoint behavior
	      </P
></LI
><LI
><P
>		Moreover, it also provides support for the Dwarf II
		debug format (which became the default format (instead
		of stabs) in gcc 3.1).
	      </P
></LI
></UL
>
	</P
><P
>	  A few Wine extensions available through the monitor command.
	  <DIV
CLASS="TABLE"
><A
NAME="AEN988"
></A
><P
><B
>Table 1-12. WineDbg's debug channels' management</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><TBODY
><TR
><TD
><B
CLASS="COMMAND"
>monitor&nbsp;wnd</B
></TD
><TD
>lists all window in the Wine session</TD
></TR
><TR
><TD
><B
CLASS="COMMAND"
>monitor&nbsp;proc</B
></TD
><TD
>		    lists all processes in the Wine session
		  </TD
></TR
><TR
><TD
><B
CLASS="COMMAND"
>monitor&nbsp;mem</B
></TD
><TD
>		    displays memory mapping of debugged process
		  </TD
></TR
></TBODY
></TABLE
></DIV
>
	</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1004"
>1.8.2. Graphical frontends to gdb</A
></H2
><P
>          This section will describe how you can debug Wine using the
          GDB mode of winedbg and some graphical front ends to GDB for
          those of you who really like graphical debuggers.
        </P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN1007"
>1.8.2.1. DDD</A
></H3
><P
>            Use the following steps, in this order:
	    <P
></P
><OL
TYPE="1"
><LI
><P
>		  Start the Wine debugger with a command line like:
<PRE
CLASS="SCREEN"
>	winedbg --gdb --no-start &lt;name_of_exe_to_debug.exe&gt;</PRE
>
		</P
></LI
><LI
><P
>                  Start ddd
                </P
></LI
><LI
><P
>		  In ddd, use the 'Open File' or 'Open Program' to
                  point to the Wine executable (which is either
		  wine-pthread or wine-kthread depending on your
		  settings).
		</P
></LI
><LI
><P
>		  In the output of 1/, there's a line like 
<PRE
CLASS="SCREEN"
>	target remote localhost:32878</PRE
>
		  copy that line and paste into ddd command pane (the
		  one with the (gdb) prompt)
		</P
></LI
></OL
>
	    The program should now be loaded and up and running.  If
	    you want, you can also add in 1/ after the name of the
	    exec all the needed parameters
          </P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN1021"
>1.8.2.2. kdbg</A
></H3
><P
>            Use the following steps, in this order:
            <P
></P
><OL
TYPE="1"
><LI
><P
>                  Start the Wine debugger with a command line like:
<PRE
CLASS="SCREEN"
>	winedbg --gdb --no-start &lt;name_of_exe_to_debug.exe&gt;</PRE
></P
></LI
><LI
><P
>		  In the output of 1/, there's a line like 
<PRE
CLASS="SCREEN"
>	target remote localhost:32878</PRE
>
		  Start kdbg with
<PRE
CLASS="SCREEN"
>kdbg -r localhost:32878 wine</PRE
>
		  localhost:32878 is not a fixed value, but has been
		  printed in step 1/. 'wine' should also be the full
		  path to the Wine executable (which is either
		  wine-pthread or wine-kthread depending on your settings).
		</P
></LI
></OL
>
	    The program should now be loaded and up and running.  If
	    you want, you can also add in 1/ after the name of the
	    exec all the needed parameters
          </P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1032"
>1.8.3. Using other Unix debuggers</A
></H2
><P
>          You can also use other debuggers (like
          <B
CLASS="COMMAND"
>gdb</B
>), but you must be aware of a few
          items:
        </P
><P
>          You need to attach the unix debugger to the correct unix
          process (representing the correct windows thread) (you can
          "guess" it from a <B
CLASS="COMMAND"
>ps fax</B
> for example:
          When running the emulator, usually the first two
          <CODE
CLASS="VARNAME"
>upids</CODE
> are for the Windows' application
          running the desktop, the first thread of the application is
          generally the third <CODE
CLASS="VARNAME"
>upid</CODE
>; when running a
          Winelib program, the first thread of the application is
          generally the first <CODE
CLASS="VARNAME"
>upid</CODE
>)
        </P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
>	    If you plan to used <B
CLASS="COMMAND"
>gdb</B
> for a
	    multi-threaded Wine application (native or Winelib), then
	    <B
CLASS="COMMAND"
>gdb</B
> will be able to handle the multiple
	    threads directly only if:
	    <P
></P
><UL
><LI
><P
>		  Wine is running on the pthread model (it won't work
		  in the kthread one).  See the Wine architecture
		  documentation for further details.
		</P
></LI
><LI
><P
>		  <B
CLASS="COMMAND"
>gdb</B
> supports the multi-threading
		  (you need gdb at least 5.0 for that).
		</P
></LI
></UL
>
	    In the unfortunate case (no direct thread support in
	    <B
CLASS="COMMAND"
>gdb</B
> because one of the above conditions
	    is false), you'll have to spawn a different
	    <B
CLASS="COMMAND"
>gdb</B
> session for each Windows' thread
	    you wish to debug (which means no synchronization for
	    debugging purposes between the various threads).
          </P
></BLOCKQUOTE
></DIV
><P
>          Here's how to get info about the current execution status of a
          certain Wine process:
        </P
><P
>          Change into your Wine source dir and enter:
        </P
><PRE
CLASS="SCREEN"
>$ gdb wine
        </PRE
><P
>          Switch to another console and enter <B
CLASS="COMMAND"
>ps ax | grep
            wine</B
> to find all wine processes.  Inside
          <B
CLASS="COMMAND"
>gdb</B
>, repeat for all Wine processes:
        </P
><PRE
CLASS="SCREEN"
>(gdb) attach <KBD
CLASS="USERINPUT"
>PID</KBD
>
        </PRE
><P
>          with <KBD
CLASS="USERINPUT"
>PID</KBD
> being the process ID of one of
          the Wine processes.  Use
        </P
><PRE
CLASS="SCREEN"
>(gdb) bt
        </PRE
><P
>          to get the backtrace of the current Wine process, i.e. the
          function call history.  That way you can find out what the
          current process is doing right now.  And then you can use
          several times:
        </P
><PRE
CLASS="SCREEN"
>(gdb) n
        </PRE
><P
>          or maybe even
        </P
><PRE
CLASS="SCREEN"
>(gdb) b <KBD
CLASS="USERINPUT"
>SomeFunction</KBD
>
        </PRE
><P
>          and
        </P
><PRE
CLASS="SCREEN"
>(gdb) c
        </PRE
><P
>          to set a breakpoint at a certain function and continue up to
          that function.  Finally you can enter
        </P
><PRE
CLASS="SCREEN"
>(gdb) detach
        </PRE
><P
>          to detach from the Wine process.
        </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1074"
>1.8.4. Using other Windows debuggers</A
></H2
><P
>          You can use any Windows' debugging API compliant debugger
          with Wine.  Some reports have been made of success with
          VisualStudio debugger (in remote mode, only the hub runs
          in Wine).  GoVest fully runs in Wine.
        </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1077"
>1.8.5. Main differences between winedbg and regular Unix debuggers</A
></H2
><DIV
CLASS="TABLE"
><A
NAME="AEN1079"
></A
><P
><B
>Table 1-13. Debuggers comparison</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><TBODY
><TR
><TD
>WineDbg</TD
><TD
>gdb</TD
></TR
><TR
><TD
>		  WineDbg debugs a Windows' process: the various
		  threads will be handled by the same WineDbg session,
		  and a breakpoint will be triggered for any thread of
		  the W-process 
                </TD
><TD
>		  gdb debugs a Windows' thread: a separate gdb session
		  is needed for each thread of a Windows' process and
		  a breakpoint will be triggered only for the w-thread
		  debugged 
                </TD
></TR
><TR
><TD
>		  WineDbg supports debug information from stabs
		  (standard Unix format) and Microsoft's C, CodeView,
		  .DBG
                </TD
><TD
>		  GDB supports debug information from stabs (standard
		  Unix format) and Dwarf II.
                </TD
></TR
></TBODY
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="dbg-commands.htm"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.htm"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="debugging.htm"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>WineDbg Command Reference</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="debugger.htm"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Debug Logging</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>