вторник сен 22, 2009

Why linking with CC instead of ld

Every now and then a problem about linking is reported on Sun Studio forums. Sometimes the problem is that users try to invoke ld, the link-editor, directly, instead of using compiler driver (CC, cc, f90, f95, ...). I'd like to shed some light on the subject and illustrate the difference.[Read More]

вторник сен 15, 2009

Useful .dbxrc entries

In this post I'm going to try to collect most useful and commonly used ~/.dbxrc settings. I'll start with contents of my ~/.dbxrc file with probably most popular aliases in hope for comments and additions.

I encourage you to share functions, aliases, useful dbxenv settings that make your dbx a better debugger.

[Read More]

понедельник сен 14, 2009

DWARF and relocations

All Sun Studio distributions [that I am aware of] contain a utility program named dwarfdump; as is apparent from its name, dwarfdump can print DWARF information contained in an ELF executable or shared object. There also exists third type of ELF files - relocatable files; those are object files (.o) produced by a compiler that can be linked together to produce another relocatable file (.o) or executable/shared library.

One would expect dwarfdump to handle all types of ELF files, but until recently, dwardump would often crash when dumping debug information of a relocatable file on x64 and sparcv9 binaries. In this post I'll explain the reasons for crash and why relocation records processing is important when reading DWARF.

[Read More]

пятница сен 11, 2009

Creating separate debug info

Separating debug info from the executable or shared library decreases its size by several times while preserving full debuggability on demand. This post describes simple procedure of creating separate debug info files.[Read More]

.gnu_debuglink or Debugging system libraries with source code

In this post I describe fairly recent and little known dbx feature  - support of separate debug info files through .gnu_debuglink section. This feature was introduced with dbx 7.7 (part of Sun Studio 12) and backported to earlier releases (you have to have latest patch for dbx earlier than 7.7). It is probably most useful on Linux systems where one can easily install packages with the debug info for virtually anything.

Here I'll describe how to step into a random libc function with the source code.

[Read More]
About

Articles, news, notes on dbx, the Sun Studio debugger and other stuff.

Search

Categories
Archives
« Сентябрь 2009 »
ПнВтСрЧтПтСбВс
 
1
2
3
4
5
6
7
8
9
10
12
13
16
17
18
19
20
21
23
24
25
26
27
28
29
30
    
       
Сегодня