The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Debugging

From Mer Wiki
(Difference between revisions)
Jump to: navigation, search
(Enabling Core files =)
(Enabling Mer debuginfo package: sdk-upgrade comment)
 
(2 intermediate revisions by one user not shown)
Line 3: Line 3:
 
Enable debuginfo packages for mer repository:
 
Enable debuginfo packages for mer repository:
 
  sed -i 's/enabled=0/enabled=1/g' /etc/zypp/repos.d/mer-core.repo
 
  sed -i 's/enabled=0/enabled=1/g' /etc/zypp/repos.d/mer-core.repo
 +
 +
This setting is resetted by '''sdk-upgrade''', so has to be done again every time.
  
 
= Enabling Core files =
 
= Enabling Core files =
  
Add more information to core files:
+
Add more information to core files, so it is easier to distinguish which file is for which application:
 
  cat > /etc/sysctl.d/core.conf << EOF
 
  cat > /etc/sysctl.d/core.conf << EOF
 
  kernel.core_uses_pid = 1
 
  kernel.core_uses_pid = 1
Line 13: Line 15:
 
  EOF
 
  EOF
  
 +
Core settings mentioned above take effect on reboot but you can also load them manually with:
 +
sysctl -p /etc/sysctl.d/core.conf
 +
 +
Then enable the actual generation of the core files, by allowing unlimited core file size by default. This setting will also automatically load on boots after this:
 
  echo "* soft core unlimited" >> /etc/security/limits.conf
 
  echo "* soft core unlimited" >> /etc/security/limits.conf
 +
 +
Same thing can be achieved with following command without reboot:
 +
ulimit -c unlimited
 +
 +
= Installing common debug tools =
 +
 +
There is package group called "Mer Debugging" that provides some debugging tools that are available in Mer Core, e.g., gdb, and some common -debuginfo packages. This can be installed with following command.
 +
 +
zypper install -t pattern mer-debugging
  
 
[[Category:Debugging]]
 
[[Category:Debugging]]

Latest revision as of 18:04, 29 July 2012

[edit] Enabling Mer debuginfo package

Enable debuginfo packages for mer repository:

sed -i 's/enabled=0/enabled=1/g' /etc/zypp/repos.d/mer-core.repo

This setting is resetted by sdk-upgrade, so has to be done again every time.

[edit] Enabling Core files

Add more information to core files, so it is easier to distinguish which file is for which application:

cat > /etc/sysctl.d/core.conf << EOF
kernel.core_uses_pid = 1
kernel.core_pattern = /tmp/core-%e-%s-%p-%t
fs.suid_dumpable = 2
EOF

Core settings mentioned above take effect on reboot but you can also load them manually with:

sysctl -p /etc/sysctl.d/core.conf

Then enable the actual generation of the core files, by allowing unlimited core file size by default. This setting will also automatically load on boots after this:

echo "* soft core unlimited" >> /etc/security/limits.conf

Same thing can be achieved with following command without reboot:

ulimit -c unlimited

[edit] Installing common debug tools

There is package group called "Mer Debugging" that provides some debugging tools that are available in Mer Core, e.g., gdb, and some common -debuginfo packages. This can be installed with following command.

zypper install -t pattern mer-debugging
Personal tools