~ubuntu-branches/ubuntu/wily/luajit/wily

« back to all changes in this revision

Viewing changes to src/lj_debug.c

  • Committer: Package Import Robot
  • Author(s): Enrico Tassi
  • Date: 2015-08-14 16:40:52 UTC
  • mfrom: (1.2.5)
  • Revision ID: package-import@ubuntu.com-20150814164052-prd0p1tz8zdupc28
Tags: 2.0.4+dfsg-1
* New upstream release (Close: #789321)
* Build on Hurd (Close: #712975)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
** Debugging and introspection.
3
 
** Copyright (C) 2005-2014 Mike Pall. See Copyright Notice in luajit.h
 
3
** Copyright (C) 2005-2015 Mike Pall. See Copyright Notice in luajit.h
4
4
*/
5
5
 
6
6
#define lj_debug_c
14
14
#include "lj_state.h"
15
15
#include "lj_frame.h"
16
16
#include "lj_bc.h"
 
17
#include "lj_vm.h"
17
18
#if LJ_HASJIT
18
19
#include "lj_jit.h"
19
20
#endif
86
87
        if (frame_islua(f)) {
87
88
          f = frame_prevl(f);
88
89
        } else {
89
 
          if (frame_isc(f))
 
90
          if (frame_isc(f) || (LJ_HASFFI && frame_iscont(f) &&
 
91
                               (f-1)->u32.lo == LJ_CONT_FFI_CALLBACK))
90
92
            cf = cframe_raw(cframe_prev(cf));
91
93
          f = frame_prevd(f);
92
94
        }
463
465
        lj_debug_shortname(ar->short_src, name);
464
466
        ar->linedefined = (int)firstline;
465
467
        ar->lastlinedefined = (int)(firstline + pt->numline);
466
 
        ar->what = firstline ? "Lua" : "main";
 
468
        ar->what = (firstline || !pt->numline) ? "Lua" : "main";
467
469
      } else {
468
470
        ar->source = "=[C]";
469
471
        ar->short_src[0] = '[';