Mailinglist Archive: yast-devel (46 mails)

< Previous Next >
[yast-devel] debugging YaST installation with GDB on SLE12-SP2
Hi,

Srinidhi has asked about GDB on IRC, and I had to look this up, so
here it is before I forget.

This applies to SLE12 code base (and openSUSE Leap 42.x). In new
code (since 2017-04) we have started embedding YaST in Ruby so the
startup sequence is different.

The problems are two: starting GDB, and setting a breakpoint.

I. Starting GDB

Starting the installation with simply "Y2GDB=1" does not work
anymore :-/ apparently gdb does not get installed. To work around
this,

I-1. Boot with

y2gdb=1 startshell=1

I-2. At the shell prompt

$ extend gdb
$ exit # to proceed with the installation

I-3. A black screen with the mouse cursor comes up. You need to switch
to the 1st console with Ctrl-Alt-F1.

II. Setting a breakpoint

It is not so simple, because the code is not yet there when you
enter main(); it is dlopen'd later on.

II-1. On the gdb prompt, let it load the plugins:
(gdb) b main
(gdb) r
(gdb) b Y2RubyClientComponent::doActualWork

II-2. Now all libraries are loaded. Set your actual breakpoint and
happy debugging.

(Well, the debuginfos are missing. I would use the DUD=foo.rpm boot
parameter to get them in.)
--
Martin Vidner, YaST Team
http://en.opensuse.org/User:Mvidner

Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
< Previous Next >
This Thread
  • No further messages