# Attach gdb to julia

**URL:** <https://discourse.julialang.org/t/attach-gdb-to-julia/31021>\
**Category:** General Usage\
**Tags:** macros, debugging\
**Created:** [November 12, 2019, 10:50pm UTC](https://discourse.julialang.org/t/attach-gdb-to-julia/31021 "2019-11-12T22:50:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![goretkin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goretkin/32/167_2.png) [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Post date:** [November 12, 2019, 10:50pm UTC](https://discourse.julialang.org/t/attach-gdb-to-julia/31021/1 "2019-11-12T22:50:01Z")

</div>

I’m trying to attach gdb (v8.3) to a debug build of julia v1.2, and I get

```julia
Attaching to process 20122
[New Thread 0x1803 of process 20122]
[New Thread 0x1903 of process 20122]
[New Thread 0x1a03 of process 20122]
[New Thread 0x1b03 of process 20122]
[New Thread 0x1c03 of process 20122]
[New Thread 0x1d03 of process 20122]
[New Thread 0x1e03 of process 20122]
[New Thread 0x1f03 of process 20122]
Error calling thread_get_state for GP registers for thread 0x1803

warning: Mach error at "i386-darwin-nat.c:132" in function "virtual void i386_darwin_nat_target::fetch_registers(struct regcache *, int)": (os/kern) invalid argument (0x4)
Reading symbols from /Users/goretkin/repos/julia/usr/bin/julia-debug...

warning: can't find symbol '_ZN4llvm30VerifyDisableABIBreakingChecksE' in minsymtab
[warnings sometimes repeat indefinitely]

warning: can't find symbol '_ZN4llvm22AggressiveAntiDepState11UnionGroupsEjj' in minsymtab

warning: can't find symbol '_ZN4llvm22AggressiveAntiDepState12GetGroupRegsEjRNSt3__16vectorIjNS1_9allocatorIjEEEEPNS1_8multimapIjNS0_17RegisterReferenceENS1_4lessIjEENS3_INS1_4pairIKjS8_EEEEEE' in minsymtab

warning: can't find symbol '_ZN4llvm22AggressiveAntiDepState6IsLiveEj' in minsymtab

warning: can't find symbol '_ZN4llvm22AggressiveAntiDepState8GetGroupEj' in minsymtab

```

These seem to be macOS-specific issues that didn’t return too much from Googling. Does anyone has suggestions for addressing these warnings?

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihnorton/32/26_2.png) [@ihnorton](https://discourse.julialang.org/u/ihnorton)\
**Post date:** [November 13, 2019, 12:06am UTC](https://discourse.julialang.org/t/attach-gdb-to-julia/31021/2 "2019-11-13T00:06:16Z")

</div>

LLDB is recommended on macOS, GDB was not really maintained on macOS for quite a while (but there have been patches in the past year).
