mirror of
https://github.com/urbit/shrub.git
synced 2024-12-26 05:23:35 +03:00
Add notes on debugging with gdb.
This commit is contained in:
parent
bfa5112164
commit
fcc8e8ada2
@ -145,6 +145,30 @@ Just do the same procedure to create a new, merged pill before
|
|||||||
committing the merge. Otherwise, just make sure to use the correct
|
committing the merge. Otherwise, just make sure to use the correct
|
||||||
`urbit.pill` for each commit.
|
`urbit.pill` for each commit.
|
||||||
|
|
||||||
|
## Debug urbit with `gdb`
|
||||||
|
|
||||||
|
Follow the build instructions in README.md but run `make` with argument `DEBUG=yes`:
|
||||||
|
|
||||||
|
(If you've already built urbit first run `make clean`.)
|
||||||
|
|
||||||
|
make DEBUG=yes
|
||||||
|
|
||||||
|
Run `gdb`, while loading `bin/urbit` and its symbol table:
|
||||||
|
|
||||||
|
gdb bin/urbit
|
||||||
|
|
||||||
|
Set a breakpoint on `main()` (optional):
|
||||||
|
|
||||||
|
break main
|
||||||
|
|
||||||
|
Run your urbit comet `mycomet`:
|
||||||
|
|
||||||
|
run mycomet
|
||||||
|
|
||||||
|
Continue from the breakpoint on `main()`:
|
||||||
|
|
||||||
|
continue
|
||||||
|
|
||||||
## What to work on
|
## What to work on
|
||||||
|
|
||||||
If you are not thinking of contributing with a specific goal in mind,
|
If you are not thinking of contributing with a specific goal in mind,
|
||||||
|
10
Makefile
10
Makefile
@ -70,10 +70,18 @@ endif
|
|||||||
INCLUDE=include
|
INCLUDE=include
|
||||||
MDEFINES=-DU3_OS_$(OS) -DU3_OS_ENDIAN_$(ENDIAN) -D U3_LIB=\"$(LIB)\"
|
MDEFINES=-DU3_OS_$(OS) -DU3_OS_ENDIAN_$(ENDIAN) -D U3_LIB=\"$(LIB)\"
|
||||||
|
|
||||||
|
DEBUG=no
|
||||||
|
|
||||||
|
ifeq ($(DEBUG),yes)
|
||||||
|
DEBUGFLAGS=-g
|
||||||
|
else
|
||||||
|
DEBUGFLAGS=-O3
|
||||||
|
endif
|
||||||
|
|
||||||
# NOTFORCHECKIN - restore -O3
|
# NOTFORCHECKIN - restore -O3
|
||||||
# -DGHETTO \
|
# -DGHETTO \
|
||||||
# -DHUSH
|
# -DHUSH
|
||||||
CFLAGS= $(COSFLAGS) -O3 -ffast-math \
|
CFLAGS= $(COSFLAGS) $(DEBUGFLAGS) -ffast-math \
|
||||||
-funsigned-char \
|
-funsigned-char \
|
||||||
-I/usr/local/include \
|
-I/usr/local/include \
|
||||||
-I/opt/local/include \
|
-I/opt/local/include \
|
||||||
|
Loading…
Reference in New Issue
Block a user