Raised This Month: $204 Target: $400
 51% 

How to get the forward name that crashed from a GDB core?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bottiger
AlliedModders Donor
Join Date: Dec 2010
Old 01-13-2020 , 19:20   How to get the forward name that crashed from a GDB core?
Reply With Quote #1

We had a server crash at CForward::Execute(int*, SourceMod::IForwardFilter*) after someone started a nativevotes to mute someone.

We saved the core dump. But I can't figure out how to get the name of the forward that crashed. Any tips?

Code:
   │0xe317074d <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+205>   jmp    0xe31708ce <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+590>          │
   │0xe3170752 <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+210>   data16 data16 data16 data16 nopw %cs:0x0(%eax,%eax,1)                                 │
   │0xe3170760 <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+224>   test   %ebx,%ebx                                                                      │
  >│0xe3170762 <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+226>   mov    (%eax),%ebp                                                                    │
   │0xe3170764 <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+228>   je     0xe3170779 <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+249>          │
   │0xe3170766 <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+230>   mov    (%ebx),%eax                                                                    │
   │0xe3170768 <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+232>   lea    0x48(%esp),%ecx                                                                │
   │0xe317076c <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+236>   mov    %ecx,0x8(%esp)                                                                 │
   │0xe3170770 <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+240>   mov    %ebp,0x4(%esp)                                                                 │
   │0xe3170774 <_ZN8CForward7ExecuteEPiPN9SourceMod14IForwardFilterE+244>   mov    %ebx,(%esp)                                                                    │
   └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
multi-thre Thread 0xf7d5c700 ( In: CForward::Execute                                                                                          L??   PC: 0xe3170762
eax            0xa1     161
ecx            0xc09c5e04       -1063494140
edx            0xffffffff       -1
ebx            0x0      0
esp            0xfff2edb0       0xfff2edb0
ebp            0x4      0x4
esi            0x0      0
edi            0xc09c5e00       -1063494144
eip            0xe3170762       0xe3170762 <CForward::Execute(int*, SourceMod::IForwardFilter*)+226>
eflags         0x10246  [ PF ZF IF RF ]
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x0      0
---Type <return> to continue, or q <return> to quit---
gs             0x63     99
__________________
bottiger is offline
bottiger
AlliedModders Donor
Join Date: Dec 2010
Old 01-13-2020 , 19:21   Re: How to get the forward name that crashed from a GDB core?
Reply With Quote #2

Hmm never mind I see someone actually wrote about the issue here https://forums.alliedmods.net/showpo...&postcount=259

But I would still like to know how to find the name of the forward that crashed from a core dump.
__________________
bottiger is offline
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Old 01-14-2020 , 08:35   Re: How to get the forward name that crashed from a GDB core?
Reply With Quote #3

Use Accelerator, if not already.
__________________
Silvers is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-14-2020 , 11:24   Re: How to get the forward name that crashed from a GDB core?
Reply With Quote #4

It is stored as a member variable on CForward, so

Code:
p this->m_name
should do the job.
__________________
asherkin is offline
bottiger
AlliedModders Donor
Join Date: Dec 2010
Old 01-14-2020 , 16:51   Re: How to get the forward name that crashed from a GDB core?
Reply With Quote #5

Quote:
Originally Posted by asherkin View Post
It is stored as a member variable on CForward, so

Code:
p this->m_name
should do the job.
Code:
Thread 1 "srcds_linux" hit Breakpoint 1, 0xe46e8680 in CForward::Execute(int*, SourceMod::IForwardFilter*) ()
   from /home/admin/steam/server1/tf/tf/addons/sourcemod_idle/bin/sourcemod.logic.so
(gdb) p this->m_name
No symbol "this" in current context.
(gdb) p ecx->m_name
No symbol "ecx" in current context.
Do I need to load Sourcemod symbols somehow?
__________________
bottiger is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:45.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode