Gdb: Debug into a different directory

Bertram Scharpf lists at bertram-scharpf.de
Fri Dec 23 14:23:26 UTC 2016


Hi,

On Friday, 16. Dec 2016, 15:08:12 +0100, Bertram Scharpf wrote on freebsd-questions:
> there's another bug in the ports. [...]
> 
>   ===>   Registering installation for texlive-texmf-20150523_3
>   [packager.bs.l] Installing texlive-texmf-20150523_3...
>   pkg-static: Fail to create temporary file: /usr/local/share/texmf-dist/fonts/vf/huerta/alegreya/.AlegreyaSansSC-Thin-tosf-ly1.vf.QWG
>   /usr/local/bin/mktexlsr: 1: Too many open files
>   mktexlsr: Done.
>   /usr/local/bin/mktexlsr: 1: Too many open files
>   mktexlsr: Done.
>   *** Error code 70
> 
>   Stop.
>   make: stopped in /usr/ports/print/texlive-texmf

I found that the error causing the return code 70 is

  pkg-static: Fail to create temporary file: /usr/local/share/texmf-dist/fonts/vf/huerta/alegreya/.AlegreyaSansSC-Thin-tosf-ly1.vf.QWG: File exists

This happens in libpkg/pkg_add.c:511. Therefore, I want to
stop execution immediatly after the openat() call and
examine the directory's contents. But I cannot set a
breakpoint in that file. Here's vaguely what I'm doing:

  # cd /usr/ports/ports-mgmt/pkg/work/pkg-1.9.4
  # cd src/
  # gdb ./pkg-static
  ...
  (gdb) break ../libpkg/pkg_add.c:511
  No source file named ../libpkg/pkg_add.c.

How can I teach gdb to find the file?

Thanks in advance.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de


More information about the freebsd-hackers mailing list