Skip to content

Commit

Permalink
debug-info-defconfig: add debug symbols needed by pahole
Browse files Browse the repository at this point in the history
With this we can see the structures

pahole -C 'snd_sof_dev' sound/soc/sof/snd-sof.o
struct snd_sof_dev {
	struct device *            dev;                  /*     0     8 */
	spinlock_t                 ipc_lock;             /*     8    72 */
	/* --- cacheline 1 boundary (64 bytes) was 16 bytes ago --- */
	spinlock_t                 hw_lock;              /*    80    72 */
	/* --- cacheline 2 boundary (128 bytes) was 24 bytes ago --- */
	bool                       dspless_mode_selected; /*   152     1 */

	/* XXX 7 bytes hole, try to pack */

	struct sof_firmware        basefw;               /*   160    16 */

	/* XXX last struct has 4 bytes of padding */

	struct snd_soc_component_driver plat_drv;        /*   176   384 */
...

Signed-off-by: Pierre-Louis Bossart <[email protected]>
  • Loading branch information
plbossart committed Jun 24, 2024
1 parent 1dea717 commit e440353
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
sudo apt update
sudo apt install -y libelf-dev
- name: Install pahole
run: |
sudo apt update
sudo apt install -y pahole
- name: Install debhelper
run: |
sudo apt update
Expand All @@ -54,6 +59,16 @@ jobs:
repository: 'thesofproject/linux'
path: 'linux'

- name: Install libelf
run: |
sudo apt update
sudo apt install -y libelf-dev
- name: Install pahole
run: |
sudo apt update
sudo apt install -y pahole
- name: build start
run: |
export ARCH=i386 KCFLAGS="-Wall -Werror"
Expand Down Expand Up @@ -108,6 +123,11 @@ jobs:
sudo apt update
sudo apt install -y libelf-dev
- name: Install pahole
run: |
sudo apt update
sudo apt install -y pahole
- name: build start
run: |
export ARCH=x86_64 CC=clang KCFLAGS="-Wall -Werror"
Expand Down
3 changes: 3 additions & 0 deletions debug-info-defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
CONFIG_DEBUG_INFO_BTF=y
1 change: 1 addition & 0 deletions kconfig-sof-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ $COMMAND .config \
"$KCONFIG_DIR"/soundwire-defconfig \
"$KCONFIG_DIR"/soundwire-codecs-defconfig \
"$KCONFIG_DIR"/bpf-defconfig \
"$KCONFIG_DIR"/debug-info-defconfig \
"$@"

0 comments on commit e440353

Please sign in to comment.