Commit 8cba911c authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Remove get_firm_object_size().

Its only use is pointless.
The following call to FormatFirmObject() detects the same problem.
parent ba96d25a
......@@ -55,35 +55,6 @@ static void debug(char *fmt, ...)
va_end(ap);
}
/**
* return the size of a firm object
*/
int get_firm_object_size(firm_kind kind)
{
switch (kind) {
case k_entity: /* an entity */
return sizeof(ir_entity);
case k_type: /* a type */
return sizeof(ir_type);
case k_ir_graph: /* an ir graph */
return sizeof(ir_graph);
case k_ir_node: /* an ir node */
return sizeof(ir_node);
case k_ir_mode: /* an ir mode */
return sizeof(ir_mode);
case k_ir_op: /* an ir opcode */
return sizeof(ir_op);
case k_tarval: /* a tarval */
return sizeof(tarval);
case k_ir_loop: /* a loop */
return sizeof(ir_loop);
case k_ir_prog: /* a program representation (irp) */
return sizeof(ir_prog);
default:
return 0;
}
}
/**
* returns the string length of a string in debuggee space
*
......
......@@ -56,7 +56,6 @@ HRESULT copy_from_debuggee(const void *address, DEBUGHELPER *pHelper, void *dst,
HRESULT WINAPI firm_Evaluate(DWORD dwAddress, DEBUGHELPER *pHelper, int nBase, BOOL bUniStrings, char *pResult, size_t max, DWORD reserved )
{
firm_kind kind;
int size;
void *address = GetInitialAddress(dwAddress, pHelper);
if (address == NULL) {
......@@ -67,10 +66,6 @@ HRESULT WINAPI firm_Evaluate(DWORD dwAddress, DEBUGHELPER *pHelper, int nBase, B
if (copy_from_debuggee(address, pHelper, &kind, sizeof(kind)) != S_OK)
return E_FAIL;
size = get_firm_object_size(kind);
if (size <= 0)
return E_FAIL;
return FormatFirmObject(pHelper, nBase, kind, address, pResult, max);
}
......
......@@ -27,13 +27,6 @@ typedef HRESULT (WINAPI *CUSTOMVIEWER)( void *address, DEBUGHELPER *pHelper, int
*/
HRESULT copy_from_debuggee(const void *address, DEBUGHELPER *pHelper, void *dst, DWORD size);
/**
* return the size of a firm object
*
* @kind the firm kind
*/
int get_firm_object_size(firm_kind kind);
/**
* Format an ident
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment