-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDEBUGGING.txt
75 lines (61 loc) · 3.23 KB
/
DEBUGGING.txt
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
This is a description of how to debug bibledit-gtk on Windows.
It assumes you have already gone through the BUILDING process
and the INSTALLING process.
Written by Matt Postiff, [email protected], 3/29/2016
General Debugging
----------------------------------------------------------------
1. If you are a hardy soul, you can run gdb from the DOS command
line. It works.
cd C:\Program Files\Bibledit-4.9.4\
\msys64\mingw64\bin\gdb editor\bin\bibledit-gtk.exe
or
cd C:\Program Files (x86)\Bibledit-4.9.4\ or
\msys64\mingw32\bin\gdb editor\bin\bibledit-gtk.exe
2. I sometimes preferr to use gdb from emacs.
1. From DOS command prompt run
\msys64\mingw64\bin\emacs or your stock Windows version of emacs
2. Once in emacs, do M-x (Alt-X) and type
gud-gdb <enter> and make the command line like this
C:/msys64/mingw64/bin/gdb --fullname
3. Once successfully running gdb, type
file "C:/Program Files/Bibledit-4.9.4/editor/bin/bibledit-gtk.exe"
(Assuming you are running 64bit version of Bibledit, change to Program Files (x86)
if needed).
4. cd C:/Program Files/Bibledit-4.9.4
to fix up the working directory.
5. Verify by typing pwd and make sure it says the same directory as above
6. set args --debug
7. Set breakpoints by opening source file and line, and type Ctrl-x Ctrl-a Ctrl-b
(hold Ctrl, then press x, a, b in sequence). You can also type
M-x gud-break and it will set a breakpoint at that line.
The Ctrl-x <space> that works on linux doesn't work by default here unless
you make some change to your emacs config.
8. Now you can type run, n for next, p for print, etc. to do debugging.
Or use the buttons at the top of the emacs window to step and so forth.
9. DOESN"T WORK YET You may have to tell gdb where to find the source code to show as you debug.
directory C:/msys64/home/postiffm/64bit/bibledit/gtk/src
3. I like Notepad++ for editing source code, but compiling
(not to mention debugging) are not really available in it.
4. Eclipse. ?
VERY INCOMPLETE. DR MEMORY HAS BROKEN FOR ME, SO I'M NOT DONE
HERE. 4/9/2016 I can fix this now. Just need time to do it.
Memory Debugging
----------------------------------------------------------------
I use Dr. Memory, from http://drmemory.org/
The binary I downloaded is at
https://github.com/DynamoRIO/drmemory/releases/download/release_1.10.0/DrMemory-Windows-1.10.0-2.msi
You can drag-and-drop the C:\Program Files\Bibledit-4.9.3\bibledit-gtk.exe
file onto the Dr. Memory icon. It will run its memory checks. But then
the question is, where is the log file? It should pop up when Dr. Memory
finishes its analysis. Its files sit in C:\users\username\AppData\Roaming\Dr. Memory\*
I would prefer to run from command line:
C:
cd \Users\username
mkdir DrMemLog
drmemory -logdir C:\Users\postiffm\DrMemLog "C:\Program Files\Bibledit-4.9.3\editor\bin\bibledit-gtk.exe"
but then bibledit-gtk doesn't seem to run fully. Running as administrator doesn't fix the problem.
If the program doesn't seem to do anything, and you see a message after you quit:
Dr. Memory failed to start the target application, perhaps due to
interference from invasive security software.
Try disabling other software or running in a virtual machine.
then you have to do this: