File: debug.md

package info (click to toggle)
freeradius 3.2.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,400 kB
  • sloc: ansic: 125,473; sh: 5,860; perl: 4,351; sql: 3,072; python: 1,559; makefile: 621; xml: 62; tcl: 35; sed: 23; ruby: 22
file content (38 lines) | stat: -rw-r--r-- 789 bytes parent folder | download | duplicates (3)
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
# Debugging on OSX

We assume that all of the code is in a particular path:

```
FR_PATH=$(HOME)/
```

The program has to be signed:

````
cd $(FR_PATH)
codesign -s - -v -f --entitlements ./scripts/osx/debug.plist ./build/bin/local/radiusd
```


Start it up in Xcode with a full path to the executable:
`$(FR_PATH)/build/bin/local/radiusd`.  Usually done via `open
./build/bin/local` and then dragging the `radius` program to the file selector in Xcode.

Set command-line arguments:

```
-fxx -l stdout -m -d $(FR_PATH)/raddb -D $(FR_PATH)/share
```

And environment variables.

```
DYLD_FALLBACK_LIBRARY_PATH=$(FR_PATH)/build/lib/.libs>
FR_LIBRARY_PATH=$(FR_PATH)/build/lib/local/.libs
```

Pass signals in `lldb` directly to the program:

```
(lldb) pro hand -p true -s false SIGHUP
```