Changeset 3528 for trunk/kDbg/kDbgLine.cpp
- Timestamp:
- Aug 20, 2007, 4:43:13 AM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/kDbg/kDbgLine.cpp
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
r3526 r3528 1 /* $Id :$ */1 /* $Id$ */ 2 2 /** @file 3 * 4 * kProfile Mark 2 - Debug Info Line Number.5 * 6 * Copyright (c) 2006 knut st. osmundsen <bird-src-spam@anduin.net.de> 7 * 3 * kDbg - The Debug Info Read, Line Numbers. 4 */ 5 6 /* 7 * Copyright (c) 2006-2007 knut st. osmundsen <bird-src-spam@anduin.net> 8 8 * 9 9 * This file is part of kLIBC. … … 29 29 * Header Files * 30 30 *******************************************************************************/ 31 #include <iprt/err.h> 32 #include <iprt/assert.h> 33 #include <iprt/alloc.h> 31 #include "kDbg.h" 32 #include "kDbgInternal.h" 34 33 35 #include "dbg.h"36 #include "kDbgBase.h"37 34 38 35 … … 45 42 * 46 43 * @returns Pointer to the duplicate. 47 * This must be freed using RTDbgSymbolFree().44 * This must be freed using kDbgSymbolFree(). 48 45 * @param pLine The line number to be duplicated. 49 46 */ 50 RTDECL(PRTDBGLINE) RTDbgLineDup(PCRTDBGLINE pLine)47 KDBG_DECL(PKDBGLINE) kDbgLineDup(PCKDBGLINE pLine) 51 48 { 52 AssertMsgReturn(VALID_PTR(pLine), ("%p\n", pLine), NULL);53 size_t cb = KDBG_OFFSETOF( RTDBGLINE, szFile[pLine->cchFile + 1]);54 return (P RTDBGLINE)RTMemDup(pLine, cb);49 kDbgAssertMsgReturn(KDBG_VALID_PTR(pLine), ("%p\n", pLine), NULL); 50 size_t cb = KDBG_OFFSETOF(KDBGLINE, szFile[pLine->cchFile + 1]); 51 return (PKDBGLINE)kDbgHlpAllocDup(pLine, cb); 55 52 } 56 53 … … 59 56 * Frees a line number obtained from the RTDbg API. 60 57 * 61 * @returns VINF_SUCCESSon success.62 * @returns VERR_INVALID_POINTER if a NULL pointer or an !VALID_PTR() is passed in.58 * @returns 0 on success. 59 * @returns KDBG_ERR_INVALID_POINTER if a NULL pointer or an !KDBG_VALID_PTR() is passed in. 63 60 * 64 61 * @param pLine The line number to be freed. 65 62 */ 66 RTDECL(int) RTDbgLineFree(PRTDBGLINE pLine)63 KDBG_DECL(int) kDbgLineFree(PKDBGLINE pLine) 67 64 { 68 65 if (!pLine) 69 return VERR_INVALID_POINTER;70 AssertMsgReturn(VALID_PTR(pLine), ("%p\n", pLine), VERR_INVALID_POINTER);66 return KDBG_ERR_INVALID_POINTER; 67 kDbgAssertMsgReturn(KDBG_VALID_PTR(pLine), ("%p\n", pLine), KDBG_ERR_INVALID_POINTER); 71 68 72 RTMemFree(pLine);73 return VINF_SUCCESS;69 kDbgHlpFree(pLine); 70 return 0; 74 71 } 75 72 -
Property svn:eol-style
set to
Note:
See TracChangeset
for help on using the changeset viewer.