Skip to navigation Skip to content
Simon Technology Blog
  • Architecture
  • Cloud
  • Database
  • Develop
  • Hardware
  • Industry
  • Language
  • Mobile
  • Opensource
  • OS
  • Web
Main Navigation

c – How to use the command flag to set breakpoints on a future shared library

September 29, 2021By Simo C & C++

I am trying to use the –command flag to automate a gdb session. I am trying to set a breakpoint on a function in a shared library (Unix equivalent DLL). My cmds.gdb looks like This way:

set args /home/shlomi/conf/bugs/kde/font-break.txt
b IA__FcFontMatch
r

pre>

However, I get the following:

shlomi:~/progs/bugs-external/kde/font-breaking$gdb --command=cmds.gdb ...
GNU gdb 6.8-2mdv2009.0 (Mandriva Linux release 2009.0)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.< br />This GDB was configured as "i586-mandriva-linux-gnu"...
(no debugging symbols found)
Function "IA__FcFontMatch" not defined.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]

So it does not set breakpoints after all. How to make it answer "y" by default "To set a breakpoint on pending future shared library loading?

I remember what I can do, but I don’t remember what it is.

To answer myself, I want to give the answer someone gave me on IRC:

(gdb) apropos pending
actions - Specify the actions to be taken at a tracepoint
set breakpoint - Breakpoint specific settings
set breakpoint pending - Set debugger's behavior regarding pending breakpoints
show breakpoint - Breakpoint specific settings
show breakpoint pending - Show debugger's behavior regarding pending breakpoints

So set a breakpoint to wait for the trick; it is used in cmds.gdb, for example

 set breakpoint pending on
break :

I am trying to use the --command flag to automate the gdb session. I am trying to share Set breakpoints on functions in the library (Unix equivalent DLL). My cmds.gdb looks like this:

set args /home/shlomi/conf /bugs/kde/font-break.txt
b IA__FcFontMatch
r

However, I get the following:

shlomi :~/progs/bugs-external/kde/font-breaking$gdb --command=cmds.gdb...
GNU gdb 6.8-2mdv2009.0 (Mandriva Linux release 2009.0)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-mandriva-linux-gnu". ..
(no debugging symbols found)
Function "IA__FcFontMatch" not defined.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]

So it does not set breakpoints after all. How can I make it answer "y" by default to set breakpoints when future shared library loads are suspended?

I remember what I can do, but I don’t remember what it is.

To answer myself, I want to give someone a The answer to me on IRC:

(gdb) apropos pending
actions - Specify the actions to be taken at a tracepoint
set breakpoint - Breakpoint specific settings
set breakpoint pending - Set debugger's behavior regarding pending breakpoints
show breakpoint - Breakpoint specific settings
show breakpoint pending - Show debugger's behavior regarding pending breakpoints

So set breakpoint wait trick; it is used in cmds.gdb, for example

set breakpoint pending on
break :

breakpoint, Command, future, how to use, logo, setup, shared library

Post navigation

C – Unefained reference to __gxx_personality_sj0`
ASP.NET-MVC – How do I debate ASP.NET MVC Controller after passing controls to View?

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2159 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment Cancel reply

Your email address will not be published.

Recent Posts
  • Sencha-Touch-2 – Sencha Touch 2, Nested XML Analysis NodeValue
  • Add a separation line and format XML content
  • Is there a norm of simplified XML subsets?
  • Look at it when you write React
  • ReactJS – Present React Redux React-Router App to add the server to the Firebase hosted by the Firebase
Categories
  • Android
  • Apache
  • Apache Kafka
  • Asp
  • Auto-Test
  • Automated Build
  • Aws
  • Bitcoin
  • Browser
  • C & C++
  • C#
  • Centos
  • Cgi
  • Character
  • Cloud Service
  • Cocos2dx
  • Cordova
  • CSS
  • Data Structure
  • Delphi
  • Design Pattern
  • Dojo
  • Dubbo
  • ELK
  • Flex
  • football
  • Game
  • Hadoop
  • Hibernate
  • HTML
  • Hybrid
  • Intel
  • IOS
  • Ipad
  • iPhone
  • Java
  • Javascript
  • Jetty
  • JQuery
  • Jsp
  • Linux
  • Load Balance
  • Lua
  • Macbook
  • Macos
  • Mathematics
  • Micro Services
  • Monitoring
  • Motherboard
  • Mysql
  • Network Hardware
  • Network Marketing
  • Nginx
  • NodeJs
  • Nosql
  • Oracle
  • Os Theory
  • Performance
  • PHP
  • Postgresql
  • Power Designer
  • React
  • Redis
  • Regexp
  • Rom
  • Rss
  • Ruby
  • Search Engines
  • Shell Script
  • Silicon Valley
  • Silverlight
  • Software Design
  • Spring
  • Sql
  • Sqlite
  • Sqlserver
  • Storage
  • Storm
  • Surface
  • SVN
  • Swift
  • System Architecture
  • Tablet
  • Uncategorized
  • Unix
  • Visual Basic
  • Visual Studio
  • Web Crawler
  • WebService
  • Windows
  • Wireless
  • XML
  • ZooKeeper
Archives
  • October 2021
  • September 2021
  • August 2021
  • May 2021
  • April 2021
  • September 2020
  • September 2019
  • August 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
© Simon Technology Blog 2025 • ThemeCountry Powered by WordPress