Why gdb fails to set breakpoint on binary compiler from souce which is a symbolic link to a file with different name?

Solution In Progress - Updated -

Issue

  • Setting break on a binary loaded in gdb, which has been compiled from a file which is a symbolic link to a file with different name throws below error:

(gdb) b 15 No line 15 in the current file. Make breakpoint pending on future shared library load? (y or [n]) Pressing "y" at this point, before punching run command, has no effect and process exits through it normally. Instead specifying breakpoint in the format <file name>:<linenum> works as expected: (gdb) b bitmapS.c:15 Breakpoint 2 at 0x40088c: file bitmapS.c, line 15.

Environment

  • gdb-7.6.1-110.el7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content