Jump to content

ch1-core1 game.core help


Recommended Posts

Guest Anonymous

 

 

i updated game source gcc9.

when i start game on putty sysser is that

 

 

(gdb) file game
Reading symbols from game...
(gdb) core game.core
[New LWP 100108]
[New LWP 100196]
[New LWP 100197]
[New LWP 100198]
warning: File "/usr/local/lib/gcc9/libstdc++.so.6.0.28-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
        add-auto-load-safe-path /usr/local/lib/gcc9/libstdc++.so.6.0.28-gdb.py
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"
Core was generated by `game'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x2901814b in free () from /lib/libc.so.7
[Current thread is 1 (LWP 100108)]
(gdb) bt full
#0  0x2901814b in free () from /lib/libc.so.7
No symbol table info available.
#1  0x28d655b8 in operator delete(void*) ()
   from /usr/local/lib/gcc9/libstdc++.so.6
No symbol table info available.
#2  0x0806209f in __gnu_cxx::new_allocator<unsigned int>::deallocate (
    this=<optimized out>, __p=<optimized out>)
    at /usr/local/lib/gcc9/include/c++/ext/new_allocator.h:128
No locals.
#3  std::allocator_traits<std::allocator<unsigned int> >::deallocate (__a=...,
    __n=<optimized out>, __p=<optimized out>)
    at /usr/local/lib/gcc9/include/c++/bits/alloc_traits.h:469
No locals.
#4  std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_deallocate (this=<optimized out>, __n=<optimized out>, __p=<optimized out>)
    at /usr/local/lib/gcc9/include/c++/bits/stl_vector.h:351
No locals.
#5  std::_Vector_base<unsigned int, std::allocator<unsigned int> >::~_Vector_base (this=<optimized out>, __in_chrg=<optimized out>)
    at /usr/local/lib/gcc9/include/c++/bits/stl_vector.h:332
No locals.
#6  std::vector<unsigned int, std::allocator<unsigned int> >::~vector (
    this=<optimized out>, __in_chrg=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--c
    at /usr/local/lib/gcc9/include/c++/bits/stl_vector.h:680
No locals.
#7  parse_array (arg1=<optimized out>, arg2=<optimized out>, arg3=<optimized out>, arg4=<optimized out>) at /usr/local/lib/gcc9/include/c++/bits/stl_vector.h:675
        m_vec_infoData = {<std::_Vector_base<unsigned int, std::allocator<unsigned int> >> = {_M_impl = {<std::allocator<unsigned int>> = {<__gnu_cxx::new_allocator<unsigned int>> = {<No data fields>}, <No data fields>}, <std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_impl_data> = {_M_start = <optimized out>, _M_finish = <optimized out>, _M_end_of_storage = <optimized out>}, <No data fields>}}, <No data fields>}
#8  0x0807aee3 in _start1 () at ../../common/length.h:1036
No symbol table info available.
#9  0x0807ae68 in _start () at ../../common/length.h:1036
No symbol table info available.
(gdb)
this my length.h
*****************************

typedef struct SItemPos
{
    BYTE window_type;
    WORD cell;
    SItemPos ()
    {
        window_type = INVENTORY;
        cell = WORD_MAX;
    }

    SItemPos (BYTE _window_type, WORD _cell)
    {
        window_type = _window_type;
        cell = _cell;  //1036.here is game.core
    }

    bool IsValidItemPosition() const
    {
        switch (window_type)
        {
        case RESERVED_WINDOW:
            return false;
        case INVENTORY:
        case EQUIPMENT:
        case BELT_INVENTORY:
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
        case SKILL_BOOK_INVENTORY:
        case UPGRADE_ITEMS_INVENTORY:
        case STONE_INVENTORY:
        case BOX_INVENTORY:
        case EFSUN_INVENTORY:
        case CICEK_INVENTORY:
#endif
            return cell < INVENTORY_AND_EQUIP_SLOT_MAX;
        case DRAGON_SOUL_INVENTORY:
            return cell < (DRAGON_SOUL_INVENTORY_MAX_NUM);
        case SAFEBOX:
        case MALL:
            return false;
#ifdef ENABLE_SWITCHBOT
        case SWITCHBOT:
            return cell < SWITCHBOT_SLOT_COUNT;
#endif
        default:
            return false;
        }
        return false;
    }
 
    bool IsEquipPosition() const
    {
        return (IsDefaultInventoryEquipPosition() || IsDragonSoulEquipPosition());
    }
    bool IsDefaultInventoryEquipPosition() const
    {
        return ((INVENTORY == window_type || EQUIPMENT == window_type) && cell >= INVENTORY_MAX_NUM && cell < INVENTORY_MAX_NUM + WEAR_MAX_NUM);
    }

#ifdef ENABLE_DS_GRADE_MYTH
    bool IsDragonSoulEquipPosition() const
    {
        return ((INVENTORY == window_type || EQUIPMENT == window_type) && cell >= DRAGON_SOUL_EQUIP_SLOT_START && cell < DRAGON_SOUL_EQUIP_SLOT_END);
    }
#else
    bool IsDragonSoulEquipPosition() const
    {
        return (DRAGON_SOUL_EQUIP_SLOT_START <= cell) && (DRAGON_SOUL_EQUIP_SLOT_END > cell);
    }
#endif

    bool IsBeltInventoryPosition() const
    {
        return ((INVENTORY == window_type) && cell >= BELT_INVENTORY_SLOT_START && cell < BELT_INVENTORY_SLOT_END);
    }

#ifdef ENABLE_EXTEND_INVEN_SYSTEM
    bool IsExtendInventoryPosition() const
    {
        return (EXTEND_INVENTORY_SLOT_START <= cell) && (EXTEND_INVENTORY_SLOT_END > cell);
    }
#endif

    bool IsDefaultInventoryPosition() const
    {
        return INVENTORY == window_type && cell < INVENTORY_MAX_NUM;
    }

#ifdef ENABLE_SWITCHBOT
    bool IsSwitchbotPosition() const
    {
        return SWITCHBOT == window_type && cell < SWITCHBOT_SLOT_COUNT;
    }
#endif

#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    bool IsSkillBookInventoryPosition() const
    {
        return ((INVENTORY == window_type) && cell >= SKILL_BOOK_INVENTORY_SLOT_START && cell < SKILL_BOOK_INVENTORY_SLOT_END);
    }
    bool IsUpgradeItemsInventoryPosition() const
    {
        return ((INVENTORY == window_type) && cell >= UPGRADE_ITEMS_INVENTORY_SLOT_START && cell < UPGRADE_ITEMS_INVENTORY_SLOT_END);
    }
    bool IsStoneInventoryPosition() const
    {
        return ((INVENTORY == window_type) && cell >= STONE_INVENTORY_SLOT_START && cell < STONE_INVENTORY_SLOT_END);
    }
    bool IsBoxInventoryPosition() const
    {
        return ((INVENTORY == window_type) && cell >= BOX_INVENTORY_SLOT_START && cell < BOX_INVENTORY_SLOT_END);
    }
    bool IsEfsunInventoryPosition() const
    {
        return ((INVENTORY == window_type) && cell >= EFSUN_INVENTORY_SLOT_START && cell < EFSUN_INVENTORY_SLOT_END);
    }
    bool IsCicekInventoryPosition() const
    {
        return ((INVENTORY == window_type) && cell >= CICEK_INVENTORY_SLOT_START && cell < CICEK_INVENTORY_SLOT_END);
    }
#endif

    bool operator==(const struct SItemPos& rhs) const
    {
        return (window_type == rhs.window_type) && (cell == rhs.cell);
    }
    bool operator<(const struct SItemPos& rhs) const
    {
        return (window_type < rhs.window_type) || ((window_type == rhs.window_type) && (cell < rhs.cell));
    }
} TItemPos;

const TItemPos NPOS (RESERVED_WINDOW, WORD_MAX);

 

 

 

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Popular Days

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.