Package: gdb-doc
Version: 8.2.1-1
Severity: wishlist
Tags: upstream

Dear Maintainer,

In section 2.1 of manual there is following text:

        You can, instead, specify a process ID as a second argument, if you
        want to debug a running process:

        gdb PROGRAM 1234

        would attach GDB to process '1234' (unless you also have a file named
        '1234'; GDB does check for a core file first).

while in section 2.1.1 there is following text:

        If the second argument begins with a decimal digit, GDB
        will first attempt to attach to it as a process, and if that fails,
        attempt to open it as a corefile.  If you have a corefile whose name
        begins with a digit, you can prevent GDB from treating it as a pid by
        prefixing it with './', e.g. './12345'.

They contradict about what will happen with invocation

        gdb ./prog 1234

when file ./1234 exists. As far as I can tell, actual behaviour
favours processes identifier to filename (behaviour suggested by
section 2.1.1).

-- System Information:
Debian Release: 10.0
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (500, 'testing'), 
(1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=eo.utf8, LC_CTYPE=eo.utf8 (charmap=UTF-8), LANGUAGE=eo.utf8 
(charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: runit (via /run/runit.stopit)
LSM: AppArmor: enabled

-- no debconf information

Attachment: pgpGspRzSJ4ev.pgp
Description: PGP signature

Reply via email to