* OpenBMC Source-Level Debugging
@ 2020-01-14 13:02 John Chung
2020-01-17 21:54 ` James Feist
0 siblings, 1 reply; 3+ messages in thread
From: John Chung @ 2020-01-14 13:02 UTC (permalink / raw)
To: openbmc
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
Hi All,
I am doing a personal study on OpenBMC recently. And I am wondering that
how to do source-level debugging via gdb, especially in vscode (Not sure it
is possible or not).
If anyone has any experience or documentation, please kindly let me know.
Very appreciated for the help.
Thanks,
John
[-- Attachment #2: Type: text/html, Size: 459 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: OpenBMC Source-Level Debugging
2020-01-14 13:02 OpenBMC Source-Level Debugging John Chung
@ 2020-01-17 21:54 ` James Feist
2020-01-17 22:04 ` Bills, Jason M
0 siblings, 1 reply; 3+ messages in thread
From: James Feist @ 2020-01-17 21:54 UTC (permalink / raw)
To: John Chung, openbmc
On 1/14/20 5:02 AM, John Chung wrote:
> Hi All,
>
> I am doing a personal study on OpenBMC recently. And I am wondering that
> how to do source-level debugging via gdb, especially in vscode (Not sure
> it is possible or not).
This is how I get gdb running, there may be (probably are) better ways:
1. Add IMAGE_INSTALL_append += "gdb" to the end of your local.conf to
get gdb in the image.
2. devtool modify 'package' to modify package
3. scp
build/workspace/sources/<package-name>/oe-workdir/packages-split/<package-name>-dbg/usr/bin/.debug/<application-name>
onto image to get symbols.
4. gdb pacakge
5. symbol-file <file you just scpd>
Not sure about vscode usage.
-James
>
> If anyone has any experience or documentation, please kindly let me know.
>
> Very appreciated for the help.
>
> Thanks,
> John
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: OpenBMC Source-Level Debugging
2020-01-17 21:54 ` James Feist
@ 2020-01-17 22:04 ` Bills, Jason M
0 siblings, 0 replies; 3+ messages in thread
From: Bills, Jason M @ 2020-01-17 22:04 UTC (permalink / raw)
To: openbmc
On 1/17/2020 1:54 PM, James Feist wrote:
> On 1/14/20 5:02 AM, John Chung wrote:
>> Hi All,
>>
>> I am doing a personal study on OpenBMC recently. And I am wondering
>> that how to do source-level debugging via gdb, especially in vscode
>> (Not sure it is possible or not).
>
> This is how I get gdb running, there may be (probably are) better ways:
>
> 1. Add IMAGE_INSTALL_append += "gdb" to the end of your local.conf to
> get gdb in the image.
> 2. devtool modify 'package' to modify package
> 3. scp
> build/workspace/sources/<package-name>/oe-workdir/packages-split/<package-name>-dbg/usr/bin/.debug/<application-name>
> onto image to get symbols.
> 4. gdb pacakge
> 5. symbol-file <file you just scpd>
>
> Not sure about vscode usage.
>
> -James
I had some minimal success getting remote GDB working. Here are the
notes that I kept:
1. Add 'IMAGE_INSTALL_append += " gdbserver"' to /local/local.conf
2. Build 'gdb-cross-arm' recipe without python
a. If libreadline.so.7 error, 'export LD_LIBRARY_PATH=<path to
libreadline.so.7>'
3. On Target, run 'gdbserver localhost:9999 <app to debug>'
4. On Host, run 'arm-openbmc-linux-gnueabi-gdb <app to debug with symbols>
a. Then run 'target remote <ip>:9999'
b. Then run 'continue' to start app on target
https://www.linux.com/news/remote-cross-target-debugging-gdb-and-gdbserver
https://stackoverflow.com/questions/21928876/gdb-can-not-load-source-file
I believe for step 2, I modified the PACKAGECONFIG to disable python.
Sorry that the notes are a little rough, and it's been a while since I
tried this, so ymmv.
-Jason
>
>>
>> If anyone has any experience or documentation, please kindly let me know.
>>
>> Very appreciated for the help.
>>
>> Thanks,
>> John
>>
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-17 22:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 13:02 OpenBMC Source-Level Debugging John Chung
2020-01-17 21:54 ` James Feist
2020-01-17 22:04 ` Bills, Jason M
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.