Your SlideShare is downloading. ×
0
Gdb
Gdb
Gdb
Gdb
Gdb
Gdb
Gdb
Gdb
Gdb
Gdb
Gdb
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Gdb

1,167

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,167
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
47
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Gdb Alejandro García Castro
  • 2. List of topics <ul><li>Debuggers </li></ul><ul><li>Ways of working </li></ul><ul><li>Examples </li></ul><ul><li>Main basic commands </li></ul><ul><li>Basic gobject </li></ul><ul><li>Emacs and GDB </li></ul>
  • 3. Introduction <ul><li>Have you ever debugged a program? </li></ul><ul><li>Have you ever debugged a C program? </li></ul><ul><li>A debugger allows you to check how a program is executed or checking what was doing when it crashed </li></ul><ul><li>In gnome we use gdb for debugging </li></ul>
  • 4. Ways of working <ul><li>debug a program, start and stop </li></ul><ul><li>debug a running process </li></ul><ul><li>debug a core file (cores activate) </li></ul>
  • 5. <ul><li>check without symbols </li></ul><ul><li>check with symbols dbg package </li></ul><ul><li>compiling always with symbols and no optimization </li></ul><ul><li>jhbuild environment </li></ul>
  • 6. Main basic commands <ul><li>use the refcard: </li></ul><ul><li>www.cs.dal.ca/studentservices/refcards/gdbref.pdf </li></ul><ul><li>breakpoints (conditionals and commands) </li></ul><ul><li>stack trace information </li></ul><ul><li>watchpoints (slow) </li></ul><ul><li>print and display </li></ul>
  • 7. Main basic commands (II) <ul><li>remote debugging </li></ul><ul><li>signals, threads and processes , handle with care :-) </li></ul>
  • 8. Basic gobject <ul><li>glib library and gobject </li></ul><ul><li>http://library.gnome.org/devel/gobject/stable/ </li></ul><ul><li>use devhelp </li></ul><ul><li>use English in the code </li></ul><ul><li>example object, rectangle. </li></ul><ul><li>diff and patch (always read your patches before sending them) </li></ul>
  • 9. Basic gobject (II) <ul><li>bugs: </li></ul><ul><ul><li>debug errors, area is not correct second time </li></ul></ul><ul><ul><li>crash destroying the object </li></ul></ul><ul><ul><li>it randomly crashes </li></ul></ul>
  • 10. Emacs and GDB <ul><li>Start gdb mode </li></ul><ul><li>Integration of the buffers with the execution of the program </li></ul><ul><li>Check refcard for more commands, help: C-h m </li></ul>
  • 11. References <ul><li>refcard: www.cs.dal.ca/studentservices/refcards/gdbref.pdf </li></ul><ul><li>http://www.gnu.org/software/gdb/gdb.html </li></ul>

×