-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added debug symbols to many debug dockers. #3098
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move source file directory into each make file to reduce the maintenance efforts.
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.
retest this please |
retest this please. |
one more comments, can you update README.buildsystem.md to explain those dbg build targets? |
@@ -9,8 +9,16 @@ SONIC_MAKE_DEBS += $(REDIS_TOOLS) | |||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
- 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)