Added debug symbols to many debug dockers.#3098
Merged
lguohan merged 5 commits intosonic-net:masterfrom Jul 4, 2019
Merged
Conversation
1) Archive source files into debug image 2) Archived source is copied into /src 3) Created an empty dir /debug 4) Mount both /src as ro & /debug as rw into every docker 5) Login banner will give some details on /src & /debug 6) Devs can copy core file into /debug and view it from inside a container. 7) Dev may create all gdb logs and other data directly into /debug.
lguohan
reviewed
Jun 29, 2019
lguohan
reviewed
Jul 3, 2019
lguohan
reviewed
Jul 3, 2019
lguohan
reviewed
Jul 3, 2019
lguohan
reviewed
Jul 3, 2019
lguohan
requested changes
Jul 3, 2019
Collaborator
lguohan
left a comment
There was a problem hiding this comment.
please move source file directory into each make file to reduce the maintenance efforts.
Contributor
Author
|
Yes, source file dirs are moved into individual Makefiles. |
2) Src directories to archive are now collected from individual Makefiles. 3) Added few more debug symbols 4) Added few more debug dockers. Here after no more changes except per review comments.
Contributor
Author
|
retest this please |
Contributor
Author
|
retest this please. |
lguohan
approved these changes
Jul 4, 2019
Collaborator
|
one more comments, can you update README.buildsystem.md to explain those dbg build targets? |
| REDIS_SERVER = redis-server_$(REDIS_VERSION)_amd64.deb | ||
| $(eval $(call add_derived_package,$(REDIS_TOOLS),$(REDIS_SERVER))) | ||
|
|
||
| REDIS_SERVER_DBG = redis-server-dbgsym_$(REDIS_VERSION)_amd64.deb |
Contributor
There was a problem hiding this comment.
In recent builds, redis-server-dbgsym package is NOT found.
dpkg-deb: building package 'redis' in '../redis_5.0.3-3~bpo9+2_all.deb'.
dpkg-deb: building package 'redis-tools-dbgsym' in '../redis-tools-dbgsym_5.0.3-3~bpo9+2_amd64.deb'.
dpkg-deb: building package 'redis-tools' in '../redis-tools_5.0.3-3~bpo9+2_amd64.deb'.
dpkg-deb: building package 'redis-sentinel' in '../redis-sentinel_5.0.3-3~bpo9+2_amd64.deb'.
dpkg-deb: building package 'redis-server' in '../redis-server_5.0.3-3~bpo9+2_amd64.deb'.
make[2]: Leaving directory '/sonic/src/redis/redis_build/redis-5.0.3'
dpkg-genbuildinfo --build=binary
dpkg-genchanges --build=binary >../redis_5.0.3-3~bpo9+2_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
dpkg-source --after-build redis-5.0.3
dpkg-source: info: using options from redis-5.0.3/debian/source/options: --extend-diff-ignore=^\.travis\.yml$
dpkg-buildpackage: info: binary-only upload (no source included)
/sonic/src/redis/redis_build /sonic/src/redis
mv: cannot stat 'redis-server-dbgsym_5.0.3-3~bpo9+2_amd64.deb': No such file or directory
Makefile:14: recipe for target '/sonic/target/debs/stretch/redis-server_5.0.3-3~bpo9+2_amd64.deb' failed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Many of the debug dockers were not loaded with required debug packages.
Identified the required debug packages and made the changes to enable their install into debug docker images.
For debug images only:
To debug:
Install required version of debug image in Switch or VM.
Copy core file into /debug of host
Get into Docker
gdb /usr/bin/<daemon> -c /debug/<your core file>set directory /src/...<-- inside gdb to get the sourceFor non-in-depth debugging:
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)