grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRUB debug (Razvan Raschitor)


From: Chris C
Subject: Re: GRUB debug (Razvan Raschitor)
Date: Thu, 8 Mar 2012 07:51:39 +0000

On Wed, 07 Mar 2012 12:00:54 -0500
address@hidden wrote:

> Send Grub-devel mailing list submissions to
>       address@hidden
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.gnu.org/mailman/listinfo/grub-devel
> or, via email, send a message with subject or body 'help' to
>       address@hidden
> 
> You can reach the person managing the list at
>       address@hidden
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Grub-devel digest..."
> 
> 
> Today's Topics:
> 
>    1. GRUB debug (Razvan Raschitor)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 7 Mar 2012 00:58:52 -0800 (PST)
> From: Razvan Raschitor <address@hidden>
> To: "address@hidden" <address@hidden>
> Subject: GRUB debug
> Message-ID:
>       <address@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hello,
> 
> ? ? I'm not sure is this is the right place to ask, but here it is. I
> want to lean how to develop a grub module. First step for me is to
> try to debug. I've tried this on the existing module : hello.? The
> problem is that I don't manage to do this. I've searched all over the
> web for tutorials, but they are all outdated ( I found some patches
> that?supposed to enable debug).? What I did is compile the last grub
> 2 build, and then I build a bootable image that?contains?the
> hello.mod that I compiled. I tried to put a break at a certain line
> from GDB, but it doesn't work.? I loaded the symbols from
> hello.module, and I want to break when the hello message is
> displayed.? Is there any tutorial that will help be figure out how to
> debug? Can you help me? -------------- next part -------------- An
> HTML attachment was scrubbed... URL:
> <http://lists.gnu.org/archive/html/grub-devel/attachments/20120307/58e82cd2/attachment.html>
> 
> ------------------------------
> 
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 
> 
> End of Grub-devel Digest, Vol 97, Issue 18
> ******************************************

Hi Razvan 

Not sure if anyone replied to you regarding your question.

There are lots of tutorials about what your asking. There specific to
the GCC. You do a google search on GCC GDB. You will see lots of info.
Breakpoints are specified with the b optioned followed by the function
name you want to insert the breakpoint into. 

Most debug is trial and error so its best to get ones hands dirty stuck
in deep, keep a pen and paper handy and write down what you did unless
you have an awesome memory lol. I run on a PC platform so all my
testing for grub has been successful, the Grub2 works. Needs some
touch-ups but it works pretty well.

To output debug data from the Grub2 binary in runtime just append the
--debug parameter when you run the scripts or programs. It chucks out
all the process to screen. I have -gdb and -gdb3 enabled on the GCC
compiler so that debug is built in and not striped when i compile the
code. Have you set these for your GCC. I use gentoo so i set them
simply in my /etc/make.conf

Hope that helps a bit.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]