LCOV - code coverage report
Current view: top level - libdwfl - dwfl_frame.c (source / functions) Hit Total Coverage
Test: elfutils-0.191 Lines: 141 226 62.4 %
Date: 2024-10-18 16:35:36 Functions: 13 17 76.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 59 126 46.8 %

           Branch data     Line data    Source code
       1                 :            : /* Get Dwarf Frame state for target PID or core file.
       2                 :            :    Copyright (C) 2013, 2014, 2024 Red Hat, Inc.
       3                 :            :    This file is part of elfutils.
       4                 :            : 
       5                 :            :    This file is free software; you can redistribute it and/or modify
       6                 :            :    it under the terms of either
       7                 :            : 
       8                 :            :      * the GNU Lesser General Public License as published by the Free
       9                 :            :        Software Foundation; either version 3 of the License, or (at
      10                 :            :        your option) any later version
      11                 :            : 
      12                 :            :    or
      13                 :            : 
      14                 :            :      * the GNU General Public License as published by the Free
      15                 :            :        Software Foundation; either version 2 of the License, or (at
      16                 :            :        your option) any later version
      17                 :            : 
      18                 :            :    or both in parallel, as here.
      19                 :            : 
      20                 :            :    elfutils is distributed in the hope that it will be useful, but
      21                 :            :    WITHOUT ANY WARRANTY; without even the implied warranty of
      22                 :            :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      23                 :            :    General Public License for more details.
      24                 :            : 
      25                 :            :    You should have received copies of the GNU General Public License and
      26                 :            :    the GNU Lesser General Public License along with this program.  If
      27                 :            :    not, see <http://www.gnu.org/licenses/>.  */
      28                 :            : 
      29                 :            : #ifdef HAVE_CONFIG_H
      30                 :            : # include <config.h>
      31                 :            : #endif
      32                 :            : 
      33                 :            : #include <system.h>
      34                 :            : 
      35                 :            : #include "libdwflP.h"
      36                 :            : 
      37                 :            : /* Set STATE->pc_set from STATE->regs according to the backend.  Return true on
      38                 :            :    success, false on error.  */
      39                 :            : static bool
      40                 :         86 : state_fetch_pc (Dwfl_Frame *state)
      41                 :            : {
      42   [ -  +  -  + ]:         86 :   switch (state->pc_state)
      43                 :            :     {
      44                 :            :     case DWFL_FRAME_STATE_PC_SET:
      45                 :            :       return true;
      46                 :          0 :     case DWFL_FRAME_STATE_PC_UNDEFINED:
      47                 :          0 :       abort ();
      48                 :         56 :     case DWFL_FRAME_STATE_ERROR:
      49                 :            :       {
      50                 :         56 :         Ebl *ebl = state->thread->process->ebl;
      51                 :         56 :         Dwarf_CIE abi_info;
      52         [ -  + ]:         56 :         if (ebl_abi_cfi (ebl, &abi_info) != 0)
      53                 :            :           {
      54                 :          0 :             __libdwfl_seterrno (DWFL_E_LIBEBL);
      55                 :          0 :             return false;
      56                 :            :           }
      57                 :         56 :         unsigned ra = abi_info.return_address_register;
      58                 :            :         /* dwarf_frame_state_reg_is_set is not applied here.  */
      59         [ -  + ]:         56 :         if (ra >= ebl_frame_nregs (ebl))
      60                 :            :           {
      61                 :          0 :             __libdwfl_seterrno (DWFL_E_LIBEBL_BAD);
      62                 :          0 :             return false;
      63                 :            :           }
      64                 :         56 :         state->pc = state->regs[ra] + ebl_ra_offset (ebl);
      65                 :         56 :         state->pc_state = DWFL_FRAME_STATE_PC_SET;
      66                 :            :       }
      67                 :         56 :       return true;
      68                 :            :     }
      69                 :          0 :   abort ();
      70                 :            : }
      71                 :            : 
      72                 :            : /* Do not call it on your own, to be used by thread_* functions only.  */
      73                 :            : 
      74                 :            : static void
      75                 :          0 : free_states (Dwfl_Frame *state)
      76                 :            : {
      77   [ -  -  -  -  :        146 :   while (state)
          +  +  -  +  +  
                      + ]
      78                 :            :     {
      79                 :         62 :       Dwfl_Frame *next = state->unwound;
      80                 :         62 :       free(state);
      81                 :         62 :       state = next;
      82                 :            :     }
      83                 :            : }
      84                 :            : 
      85                 :            : static Dwfl_Frame *
      86                 :         86 : state_alloc (Dwfl_Thread *thread)
      87                 :            : {
      88         [ -  + ]:         86 :   assert (thread->unwound == NULL);
      89                 :         86 :   Ebl *ebl = thread->process->ebl;
      90                 :         86 :   size_t nregs = ebl_frame_nregs (ebl);
      91         [ -  + ]:         86 :   if (nregs == 0)
      92                 :            :     return NULL;
      93         [ -  + ]:         86 :   assert (nregs < sizeof (((Dwfl_Frame *) NULL)->regs_set) * 8);
      94                 :         86 :   Dwfl_Frame *state = malloc (sizeof (*state) + sizeof (*state->regs) * nregs);
      95         [ -  + ]:         86 :   if (state == NULL)
      96                 :            :     return NULL;
      97                 :         86 :   state->thread = thread;
      98                 :         86 :   state->signal_frame = false;
      99                 :         86 :   state->initial_frame = true;
     100                 :         86 :   state->pc_state = DWFL_FRAME_STATE_ERROR;
     101                 :         86 :   state->unwound_source = DWFL_UNWOUND_INITIAL_FRAME;
     102                 :         86 :   memset (state->regs_set, 0, sizeof (state->regs_set));
     103                 :         86 :   thread->unwound = state;
     104                 :         86 :   state->unwound = NULL;
     105                 :         86 :   return state;
     106                 :            : }
     107                 :            : 
     108                 :            : void
     109                 :            : internal_function
     110                 :        102 : __libdwfl_process_free (Dwfl_Process *process)
     111                 :            : {
     112                 :        102 :   Dwfl *dwfl = process->dwfl;
     113         [ +  + ]:        102 :   if (process->callbacks->detach != NULL)
     114                 :        100 :     process->callbacks->detach (dwfl, process->callbacks_arg);
     115         [ -  + ]:        102 :   assert (dwfl->process == process);
     116                 :        102 :   dwfl->process = NULL;
     117         [ +  + ]:        102 :   if (process->ebl_close)
     118                 :        100 :     ebl_closebackend (process->ebl);
     119                 :        102 :   free (process);
     120                 :        102 :   dwfl->attacherr = DWFL_E_NOERROR;
     121                 :        102 : }
     122                 :            : 
     123                 :            : /* Allocate new Dwfl_Process for DWFL.  */
     124                 :            : static void
     125                 :        104 : process_alloc (Dwfl *dwfl)
     126                 :            : {
     127                 :        104 :   Dwfl_Process *process = malloc (sizeof (*process));
     128         [ +  - ]:        104 :   if (process == NULL)
     129                 :            :     return;
     130                 :        104 :   process->dwfl = dwfl;
     131                 :        104 :   dwfl->process = process;
     132                 :            : }
     133                 :            : 
     134                 :            : bool
     135                 :        104 : dwfl_attach_state (Dwfl *dwfl, Elf *elf, pid_t pid,
     136                 :            :                    const Dwfl_Thread_Callbacks *thread_callbacks, void *arg)
     137                 :            : {
     138         [ -  + ]:        104 :   if (dwfl->process != NULL)
     139                 :            :     {
     140                 :          0 :       __libdwfl_seterrno (DWFL_E_ATTACH_STATE_CONFLICT);
     141                 :          0 :       return false;
     142                 :            :     }
     143                 :            : 
     144                 :            :   /* Reset any previous error, we are just going to try again.  */
     145                 :        104 :   dwfl->attacherr = DWFL_E_NOERROR;
     146                 :            :   /* thread_callbacks is declared NN */
     147         [ +  - ]:        104 :   if (thread_callbacks->next_thread == NULL
     148         [ -  + ]:        104 :       || thread_callbacks->set_initial_registers == NULL)
     149                 :            :     {
     150                 :          0 :       dwfl->attacherr = DWFL_E_INVALID_ARGUMENT;
     151                 :          0 :     fail:
     152                 :          0 :       dwfl->attacherr = __libdwfl_canon_error (dwfl->attacherr);
     153                 :          0 :       __libdwfl_seterrno (dwfl->attacherr);
     154                 :          0 :       return false;
     155                 :            :     }
     156                 :            : 
     157                 :        104 :   Ebl *ebl;
     158                 :        104 :   bool ebl_close;
     159         [ +  + ]:        104 :   if (elf != NULL)
     160                 :            :     {
     161                 :        102 :       ebl = ebl_openbackend (elf);
     162                 :        102 :       ebl_close = true;
     163                 :            :     }
     164                 :            :   else
     165                 :            :     {
     166                 :          2 :       ebl = NULL;
     167         [ +  - ]:          2 :       for (Dwfl_Module *mod = dwfl->modulelist; mod != NULL; mod = mod->next)
     168                 :            :         {
     169                 :            :           /* Reading of the vDSO or (deleted) modules may fail as
     170                 :            :              /proc/PID/mem is unreadable without PTRACE_ATTACH and
     171                 :            :              we may not be PTRACE_ATTACH-ed now.  MOD would not be
     172                 :            :              re-read later to unwind it when we are already
     173                 :            :              PTRACE_ATTACH-ed to PID.  This happens when this function
     174                 :            :              is called from dwfl_linux_proc_attach with elf == NULL.
     175                 :            :              __libdwfl_module_getebl will call __libdwfl_getelf which
     176                 :            :              will call the find_elf callback.  */
     177         [ +  - ]:          2 :           if (startswith (mod->name, "[vdso: ")
     178   [ +  -  -  + ]:          4 :               || strcmp (strrchr (mod->name, ' ') ?: "",
     179                 :            :                          " (deleted)") == 0)
     180                 :          0 :             continue;
     181                 :          2 :           Dwfl_Error error = __libdwfl_module_getebl (mod);
     182         [ -  + ]:          2 :           if (error != DWFL_E_NOERROR)
     183                 :          0 :             continue;
     184                 :          2 :           ebl = mod->ebl;
     185                 :          2 :           break;
     186                 :            :         }
     187                 :            :       ebl_close = false;
     188                 :            :     }
     189         [ -  + ]:        104 :   if (ebl == NULL)
     190                 :            :     {
     191                 :            :       /* Not identified EBL from any of the modules.  */
     192                 :          0 :       dwfl->attacherr = DWFL_E_PROCESS_NO_ARCH;
     193                 :          0 :       goto fail;
     194                 :            :     }
     195                 :        104 :   process_alloc (dwfl);
     196                 :        104 :   Dwfl_Process *process = dwfl->process;
     197         [ -  + ]:        104 :   if (process == NULL)
     198                 :            :     {
     199         [ #  # ]:          0 :       if (ebl_close)
     200                 :          0 :         ebl_closebackend (ebl);
     201                 :          0 :       dwfl->attacherr = DWFL_E_NOMEM;
     202                 :          0 :       goto fail;
     203                 :            :     }
     204                 :        104 :   process->ebl = ebl;
     205                 :        104 :   process->ebl_close = ebl_close;
     206                 :        104 :   process->pid = pid;
     207                 :        104 :   process->callbacks = thread_callbacks;
     208                 :        104 :   process->callbacks_arg = arg;
     209                 :        104 :   return true;
     210                 :            : }
     211                 :            : INTDEF(dwfl_attach_state)
     212                 :            : 
     213                 :            : pid_t
     214                 :        138 : dwfl_pid (Dwfl *dwfl)
     215                 :            : {
     216         [ -  + ]:        138 :   if (dwfl->attacherr != DWFL_E_NOERROR)
     217                 :            :     {
     218                 :          0 :       __libdwfl_seterrno (dwfl->attacherr);
     219                 :          0 :       return -1;
     220                 :            :     }
     221                 :            : 
     222         [ -  + ]:        138 :   if (dwfl->process == NULL)
     223                 :            :     {
     224                 :          0 :       __libdwfl_seterrno (DWFL_E_NO_ATTACH_STATE);
     225                 :          0 :       return -1;
     226                 :            :     }
     227                 :        138 :   return dwfl->process->pid;
     228                 :            : }
     229                 :            : INTDEF(dwfl_pid)
     230                 :            : 
     231                 :            : Dwfl *
     232                 :        332 : dwfl_thread_dwfl (Dwfl_Thread *thread)
     233                 :            : {
     234                 :        332 :   return thread->process->dwfl;
     235                 :            : }
     236                 :            : INTDEF(dwfl_thread_dwfl)
     237                 :            : 
     238                 :            : pid_t
     239                 :        484 : dwfl_thread_tid (Dwfl_Thread *thread)
     240                 :            : {
     241                 :        484 :   return thread->tid;
     242                 :            : }
     243                 :            : INTDEF(dwfl_thread_tid)
     244                 :            : 
     245                 :            : Dwfl_Thread *
     246                 :        330 : dwfl_frame_thread (Dwfl_Frame *state)
     247                 :            : {
     248                 :        330 :   return state->thread;
     249                 :            : }
     250                 :            : INTDEF(dwfl_frame_thread)
     251                 :            : 
     252                 :            : Dwfl_Unwound_Source
     253                 :         98 : dwfl_frame_unwound_source (Dwfl_Frame *state)
     254                 :            : {
     255                 :         98 :   return state->unwound_source;
     256                 :            : }
     257                 :            : INTDEF(dwfl_frame_unwound_source)
     258                 :            : 
     259                 :            : const char *
     260                 :         88 : dwfl_unwound_source_str (Dwfl_Unwound_Source unwound_source)
     261                 :            : {
     262   [ +  +  -  -  :         88 :   switch (unwound_source)
                   -  - ]
     263                 :            :     {
     264                 :            :     case DWFL_UNWOUND_NONE:
     265                 :            :       return "none";
     266                 :         30 :     case DWFL_UNWOUND_INITIAL_FRAME:
     267                 :         30 :       return "initial";
     268                 :         58 :     case DWFL_UNWOUND_EH_CFI:
     269                 :         58 :       return "eh_frame";
     270                 :          0 :     case DWFL_UNWOUND_DWARF_CFI:
     271                 :          0 :       return "dwarf";
     272                 :          0 :     case DWFL_UNWOUND_EBL:
     273                 :          0 :       return "ebl";
     274                 :          0 :     default:
     275                 :          0 :       return "unknown";
     276                 :            :     }
     277                 :            : }
     278                 :            : INTDEF(dwfl_unwound_source_str)
     279                 :            : 
     280                 :            : int
     281                 :         62 : dwfl_getthreads (Dwfl *dwfl, int (*callback) (Dwfl_Thread *thread, void *arg),
     282                 :            :                  void *arg)
     283                 :            : {
     284         [ -  + ]:         62 :   if (dwfl->attacherr != DWFL_E_NOERROR)
     285                 :            :     {
     286                 :          0 :       __libdwfl_seterrno (dwfl->attacherr);
     287                 :          0 :       return -1;
     288                 :            :     }
     289                 :            : 
     290                 :         62 :   Dwfl_Process *process = dwfl->process;
     291         [ -  + ]:         62 :   if (process == NULL)
     292                 :            :     {
     293                 :          0 :       __libdwfl_seterrno (DWFL_E_NO_ATTACH_STATE);
     294                 :          0 :       return -1;
     295                 :            :     }
     296                 :            : 
     297                 :         62 :   Dwfl_Thread thread;
     298                 :         62 :   thread.process = process;
     299                 :         62 :   thread.unwound = NULL;
     300                 :         62 :   thread.callbacks_arg = NULL;
     301                 :         62 :   thread.aarch64.pauth_insn_mask = 0;
     302                 :            : 
     303                 :        152 :   for (;;)
     304                 :            :     {
     305                 :        152 :       thread.tid = process->callbacks->next_thread (dwfl,
     306                 :            :                                                     process->callbacks_arg,
     307                 :            :                                                     &thread.callbacks_arg);
     308         [ +  - ]:        152 :       if (thread.tid < 0)
     309                 :            :         return -1;
     310         [ +  + ]:        152 :       if (thread.tid == 0)
     311                 :            :         {
     312                 :         60 :           __libdwfl_seterrno (DWFL_E_NOERROR);
     313                 :         60 :           return 0;
     314                 :            :         }
     315                 :         92 :       int err = callback (&thread, arg);
     316         [ -  + ]:         90 :       if (err != DWARF_CB_OK)
     317                 :          0 :         return err;
     318         [ +  - ]:         90 :       assert (thread.unwound == NULL);
     319                 :            :     }
     320                 :            :   /* NOTREACHED */
     321                 :            : }
     322                 :            : INTDEF(dwfl_getthreads)
     323                 :            : 
     324                 :            : struct one_arg
     325                 :            : {
     326                 :            :   pid_t tid;
     327                 :            :   bool seen;
     328                 :            :   int (*callback) (Dwfl_Thread *thread, void *arg);
     329                 :            :   void *arg;
     330                 :            :   int ret;
     331                 :            : };
     332                 :            : 
     333                 :            : static int
     334                 :          0 : get_one_thread_cb (Dwfl_Thread *thread, void *arg)
     335                 :            : {
     336                 :          0 :   struct one_arg *oa = (struct one_arg *) arg;
     337   [ #  #  #  # ]:          0 :   if (! oa->seen && INTUSE(dwfl_thread_tid) (thread) == oa->tid)
     338                 :            :     {
     339                 :          0 :       oa->seen = true;
     340                 :          0 :       oa->ret = oa->callback (thread, oa->arg);
     341                 :          0 :       return DWARF_CB_ABORT;
     342                 :            :     }
     343                 :            : 
     344                 :            :   return DWARF_CB_OK;
     345                 :            : }
     346                 :            : 
     347                 :            : /* Note not currently exported, will be when there are more Dwfl_Thread
     348                 :            :    properties to query.  Use dwfl_getthread_frames for now directly.  */
     349                 :            : static int
     350                 :          0 : getthread (Dwfl *dwfl, pid_t tid,
     351                 :            :            int (*callback) (Dwfl_Thread *thread, void *arg),
     352                 :            :            void *arg)
     353                 :            : {
     354         [ #  # ]:          0 :   if (dwfl->attacherr != DWFL_E_NOERROR)
     355                 :            :     {
     356                 :          0 :       __libdwfl_seterrno (dwfl->attacherr);
     357                 :          0 :       return -1;
     358                 :            :     }
     359                 :            : 
     360                 :          0 :   Dwfl_Process *process = dwfl->process;
     361         [ #  # ]:          0 :   if (process == NULL)
     362                 :            :     {
     363                 :          0 :       __libdwfl_seterrno (DWFL_E_NO_ATTACH_STATE);
     364                 :          0 :       return -1;
     365                 :            :     }
     366                 :            : 
     367         [ #  # ]:          0 :   if (process->callbacks->get_thread != NULL)
     368                 :            :     {
     369                 :          0 :       Dwfl_Thread thread;
     370                 :          0 :       thread.process = process;
     371                 :          0 :       thread.unwound = NULL;
     372                 :          0 :       thread.callbacks_arg = NULL;
     373                 :          0 :       thread.aarch64.pauth_insn_mask = 0;
     374                 :            : 
     375         [ #  # ]:          0 :       if (process->callbacks->get_thread (dwfl, tid, process->callbacks_arg,
     376                 :            :                                           &thread.callbacks_arg))
     377                 :            :         {
     378                 :          0 :           thread.tid = tid;
     379                 :          0 :           return callback (&thread, arg);
     380                 :            :         }
     381                 :            : 
     382                 :            :       return -1;
     383                 :            :     }
     384                 :            : 
     385                 :          0 :    struct one_arg oa = { .tid = tid, .callback = callback,
     386                 :            :                          .arg = arg, .seen = false };
     387                 :          0 :    int err = INTUSE(dwfl_getthreads) (dwfl, get_one_thread_cb, &oa);
     388                 :            : 
     389   [ #  #  #  # ]:          0 :    if (err == DWARF_CB_ABORT && oa.seen)
     390                 :          0 :      return oa.ret;
     391                 :            : 
     392   [ #  #  #  # ]:          0 :    if (err == DWARF_CB_OK && ! oa.seen)
     393                 :            :      {
     394                 :          0 :         errno = ESRCH;
     395                 :          0 :         __libdwfl_seterrno (DWFL_E_ERRNO);
     396                 :          0 :         return -1;
     397                 :            :      }
     398                 :            : 
     399                 :            :    return err;
     400                 :            : }
     401                 :            : 
     402                 :            : struct one_thread
     403                 :            : {
     404                 :            :   int (*callback) (Dwfl_Frame *frame, void *arg);
     405                 :            :   void *arg;
     406                 :            : };
     407                 :            : 
     408                 :            : static int
     409                 :          0 : get_one_thread_frames_cb (Dwfl_Thread *thread, void *arg)
     410                 :            : {
     411                 :          0 :   struct one_thread *ot = (struct one_thread *) arg;
     412                 :          0 :   return INTUSE(dwfl_thread_getframes) (thread, ot->callback, ot->arg);
     413                 :            : }
     414                 :            : 
     415                 :            : int
     416                 :          0 : dwfl_getthread_frames (Dwfl *dwfl, pid_t tid,
     417                 :            :                        int (*callback) (Dwfl_Frame *frame, void *arg),
     418                 :            :                        void *arg)
     419                 :            : {
     420                 :          0 :   struct one_thread ot = { .callback = callback, .arg = arg };
     421                 :          0 :   return getthread (dwfl, tid, get_one_thread_frames_cb, &ot);
     422                 :            : }
     423                 :            : INTDEF(dwfl_getthread_frames)
     424                 :            : 
     425                 :            : int
     426                 :         86 : dwfl_thread_getframes (Dwfl_Thread *thread,
     427                 :            :                        int (*callback) (Dwfl_Frame *state, void *arg),
     428                 :            :                        void *arg)
     429                 :            : {
     430                 :         86 :   Ebl *ebl = thread->process->ebl;
     431         [ -  + ]:         86 :   if (ebl_frame_nregs (ebl) == 0)
     432                 :            :     {
     433                 :          0 :       __libdwfl_seterrno (DWFL_E_NO_UNWIND);
     434                 :          0 :       return -1;
     435                 :            :     }
     436         [ -  + ]:         86 :   if (state_alloc (thread) == NULL)
     437                 :            :     {
     438                 :          0 :       __libdwfl_seterrno (DWFL_E_NOMEM);
     439                 :          0 :       return -1;
     440                 :            :     }
     441                 :         86 :   Dwfl_Process *process = thread->process;
     442         [ -  + ]:         86 :   if (! process->callbacks->set_initial_registers (thread,
     443                 :            :                                                    thread->callbacks_arg))
     444                 :            :     {
     445                 :          0 :       free_states (thread->unwound);
     446                 :          0 :       thread->unwound = NULL;
     447                 :          0 :       return -1;
     448                 :            :     }
     449                 :         86 :   Dwfl_Frame *state = thread->unwound;
     450                 :         86 :   thread->unwound = NULL;
     451         [ -  + ]:         86 :   if (! state_fetch_pc (state))
     452                 :            :     {
     453         [ #  # ]:          0 :       if (process->callbacks->thread_detach)
     454                 :          0 :         process->callbacks->thread_detach (thread, thread->callbacks_arg);
     455                 :         36 :       free_states (state);
     456                 :            :       return -1;
     457                 :            :     }
     458                 :        428 :   do
     459                 :            :     {
     460                 :        428 :       int err = callback (state, arg);
     461         [ +  + ]:        426 :       if (err != DWARF_CB_OK)
     462                 :            :         {
     463         [ -  + ]:         14 :           if (process->callbacks->thread_detach)
     464                 :          0 :             process->callbacks->thread_detach (thread, thread->callbacks_arg);
     465                 :         84 :           free_states (state);
     466                 :            :           return err;
     467                 :            :         }
     468                 :        412 :       __libdwfl_frame_unwind (state);
     469                 :        412 :       Dwfl_Frame *next = state->unwound;
     470                 :            :       /* The old frame is no longer needed.  */
     471                 :        412 :       free (state);
     472                 :        412 :       state = next;
     473                 :            :     }
     474   [ +  +  +  + ]:        412 :   while (state && state->pc_state == DWFL_FRAME_STATE_PC_SET);
     475                 :            : 
     476                 :         70 :   Dwfl_Error err = dwfl_errno ();
     477         [ +  + ]:         70 :   if (process->callbacks->thread_detach)
     478                 :          6 :     process->callbacks->thread_detach (thread, thread->callbacks_arg);
     479   [ +  +  -  + ]:         70 :   if (state == NULL || state->pc_state == DWFL_FRAME_STATE_ERROR)
     480                 :            :     {
     481                 :         36 :       free_states (state);
     482                 :         36 :       __libdwfl_seterrno (err);
     483                 :         36 :       return -1;
     484                 :            :     }
     485         [ -  + ]:         34 :   assert (state->pc_state == DWFL_FRAME_STATE_PC_UNDEFINED);
     486                 :         84 :   free_states (state);
     487                 :            :   return 0;
     488                 :            : }
     489                 :            : INTDEF(dwfl_thread_getframes)

Generated by: LCOV version 1.16