Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7057911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:02:59+00:00 2026-05-28T04:02:59+00:00

I’m running an application (firefox) and I would like to know if it’s possible

  • 0

I’m running an application (firefox) and I would like to know if it’s possible to use GDB to attach to the process and kill a specific thread. Is there a way to do this?

I understand that this operation will probably crash the app.

EDIT:

In this debugging session, ps -ax revealed that firefox pid is 1328:

$ gdb /Applications/Firefox.app/Contents/MacOS/firefox 1328
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov  3 21:59:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ....... done

/Users/karlphillip/1328: No such file or directory
Attaching to program: `/Applications/Firefox.app/Contents/MacOS/firefox', process 1328.
Reading symbols for shared libraries + done
Reading symbols for shared libraries ++++++......................................................................................................................................................................................................... done
0x00007fff90b9a67a in mach_msg_trap ()
(gdb) info threads
  25                                 0x00007fff90b9bbca in __psynch_cvwait ()
  24                                 0x00007fff90b9bbca in __psynch_cvwait ()
  23                                 0x00007fff90b9bbca in __psynch_cvwait ()
  22                                 0x00007fff90b9a67a in mach_msg_trap ()
  21                                 0x00007fff90b9bbca in __psynch_cvwait ()
  20                                 0x00007fff90b9bbca in __psynch_cvwait ()
  19                                 0x00007fff90b9bbca in __psynch_cvwait ()
  18                                 0x00007fff90b9bbca in __psynch_cvwait ()
  17                                 0x00007fff90b9bbca in __psynch_cvwait ()
  16                                 0x00007fff90b9bbca in __psynch_cvwait ()
  15                                 0x00007fff90b9bbca in __psynch_cvwait ()
  14                                 0x00007fff90b9bbca in __psynch_cvwait ()
  13                                 0x00007fff90b9bbca in __psynch_cvwait ()
  12                                 0x00007fff90b9bbca in __psynch_cvwait ()
  11                                 0x00007fff90b9bbca in __psynch_cvwait ()
  10                                 0x00007fff90b9bbca in __psynch_cvwait ()
   9                                 0x00007fff90b9bbca in __psynch_cvwait ()
   8                                 0x00007fff90b9bbca in __psynch_cvwait ()
   7                                 0x00007fff90b9bdf2 in select$DARWIN_EXTSN ()
   6                                 0x00007fff90b9bbca in __psynch_cvwait ()
   5                                 0x00007fff90b9bbca in __psynch_cvwait ()
   4                                 0x00007fff90b9c7e6 in kevent ()
   3                                 0x00007fff90b9a67a in mach_msg_trap ()
   2 "com.apple.libdispatch-manager" 0x00007fff90b9c7e6 in kevent ()
*  1 "com.apple.main-thread"         0x00007fff90b9a67a in mach_msg_trap ()
(gdb) call raise(6, NOHUP)
No symbol table is loaded.  Use the "file" command.
(gdb)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:03:00+00:00Added an answer on May 28, 2026 at 4:03 am

    You can certainly send a specific thread a signal with GDB call raise(kernel-thread-id, signo) or call pthread_kill(pthread-thread-id, signo).

    EDIT:

    No symbol table is loaded. Use the “file” command.

    My guess is that you did something like this:

    gdb
    ...
    (gdb) attach <pid>
    

    On some platforms GDB can figure out which executable is running in a given process (e.g. from /proc/<pid>/exe on Linux). I am guessing that MacOS is not one of these platforms, and so you must tell GDB. Do this instead:

    gdb /path/to/exe <pid>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to count the length of a string with PHP. The string
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace
I am currently running into a problem where an element is coming back from
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.