пятница апр 16, 2010

pstack, coreadm and symbol tables

pstack(1) is a Solaris utility (from the rich family of proc(1) tools) that displays stacks of live and dead (core'd) processes. For stack trace to of any use, it should print function addresses in symbolic form like main+12 rather than plain numbers like 0x08050952. Where does pstack gets this address-to-symbol mapping and how you can influence this process? Read on.[Read More]

вторник сен 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]

среда авг 13, 2008

Solaris and GNU ELF examination utilities cheatsheets

A new set of cheatsheets, now with rather frequently used utilities for ELF files examination. Includes nm, readelf, pvs and a bunch of other useful programs:

GNU ELF utilities cheatsheet Solaris ELF utilities cheatsheet
[PDF] [Inkscape SVG] [Inkscape SVG] [PDF]

NOTE: .svg files are saved as "Inkscape SVG" and are intended to be edited in Inkscape, not to be viewed by common image viewer (which may display garbage instead of some elemets).

Refs:

вторник июл 22, 2008

mdb cheatsheets

I don't use mdb in my everyday work, however sometimes it is not only useful, but essential - when you have to debug at low level, which dbx tends to hide from you (for example, dbx usually can't display stack trace past main()). So here are a few commands that I find useful:

mdb debugger cheatsheet mdb debugger cheatsheet
[PDF] [Inkscape SVG] [Inkscape SVG] [PDF]

NOTE: .svg files are saved as "Inkscape SVG" and are intended to be edited in Inkscape, not to be viewed by common image viewer (which may display garbage instead of some elemets).

Refs:

среда июл 16, 2008

SPARC assembler cheatsheets

I got tired of looking up what this or that SPARC instruction means and where to find %fp register value when you're in a leaf procedure, so I decided to prepare a few small cheatsheets that have this kind of information in very compact form.

I'm posting PDF and source svg here in hope that this info will be useful for other people as well. Anyone's welcomed to download/print/modify those.

SPARC assembler cheatsheet SPARC ABI cheatsheet
[PDF] [Inkscape SVG] [Inkscape SVG] [PDF]

NOTE: .svg files are saved as "Inkscape SVG" and are intended to be edited in Inkscape, not to be viewed by common image viewer (which may display garbage instead of some elemets).

Refs:

вторник янв 29, 2008

Статьи о работе над повышением производительности приложений

На сайте developers.sun.ru появилась статья на практически вечную тему - увеличение производительности за счет лучшего использования процессорного кэша. Обычно под этим подразумевается оптимизация доступа к кэшу данных (поскольку управлять доступом к данным автору программы проще); в этой же статье даются советы по более эффективному использованию кэша инструкций, который больше доступен авторам компилятора и компоновщика, чем прикладным программистам. Полное название статьи - "Улучшаем производительность приложения путем перераспределения кода".

На сходную тему есть также статьи на английском языке:

вторник ноя 27, 2007

ЧаВо о Sun Studio на русском языке

Страница с вопросами и ответами о Sun Studio  -- на русском языке и с актуальной информацией.

 Я перевел существующий FAQ о Sun Studio Криса Квенелли, а заодно и обновил содержащуюся там информацию (во время составления оригинального FAQ актуальной была версия 11, теперь же последняя версия Sun Studio - 12).

четверг ноя 22, 2007

Портал для русскоговорящих разработчиков

Недавно открылся портал разработчиков Sun, содержащий информацию о массе технологий и продуктов, включая высокопроизводительные вычисления, Солярис, DTrace, ZFS и проч. связанные материи, а также Sun Studio - компиляторы C, C++, Fortran и инструменты для разработчиков. На сайте уже есть и будут появлятся новые статьи, анонсы и прочие материалы, нужные разработчикам для линукса и соляриса.

Сейчас на странице о Sun Studio представлены следующие материалы:

и другие статьи и новости о технологиях Sun в области разработки ПО.

пятница июл 06, 2007

gdb vs. dbx: commands mapping and feature comparison

A table displaying correspondence between gdb and dbx commands, similar to one found in dbx `help FAQ', but a lot larger.[Read More]

четверг апр 26, 2007

Installing nexenta (GNU Solaris) on Sun W2100z box

This post describes setup and (mostly) configuration of Nexenta OS on an W2100z Opteron box.

My configuration (most important parts):

  • Static IP address
  • Machine is in NIS domain
I used latest unstable version - alpha 7 test 2, which is based on build 61 of OpenSolaris.[Read More]
About

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

Search

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