Skip to content

Commit

Permalink
Add MIPS compile flags and clean up gcc 5.1 warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
lchouinard committed Jul 8, 2015
1 parent 5391d3d commit 2f59c49
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
3 changes: 2 additions & 1 deletion applications/crash/eppic.c
Expand Up @@ -54,6 +54,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <eppic_api.h>

Expand Down Expand Up @@ -1003,7 +1004,7 @@ unsigned long get_curtask();
return eppic_makebtype((ull)get_curtask());
}

_init() /* Register the command set. */
int _init() /* Register the command set. */
{
#define LCDIR "/usr/share/eppic/crash"
#define LCIDIR "include"
Expand Down
3 changes: 3 additions & 0 deletions libeppic/Makefile
Expand Up @@ -34,6 +34,9 @@ endif
ifeq ($(TARGET), X86)
CFLAGS += -m32
endif
ifeq ($(TARGET), MIPS)
CFLAGS += -m32
endif

CFILES = eppic_util.c eppic_node.c eppic_var.c eppic_func.c eppic_str.c \
eppic_op.c eppic_num.c eppic_stat.c eppic_builtin.c eppic_type.c \
Expand Down
8 changes: 6 additions & 2 deletions libeppic/eppic.h
Expand Up @@ -334,6 +334,7 @@ void eppic_popallin(void);
void eppic_tagst(void);
void eppic_flushtdefs(void);
void eppic_setsvlev(int newlev);
void eppic_setvlev(int lev);
void eppic_flushmacs(void *tag);
void eppic_add_auto(var_t*nv);
void *eppic_chkbuiltin(char *name);
Expand All @@ -352,6 +353,7 @@ void eppic_baseop(int op, value_t *v1, value_t *v2, value_t *result);
void eppic_setinsizeof(int v);
void eppic_freeidx(idx_t *idx);
void eppic_freedvar(dvar_t*dv);
void eppic_caller(void *p, void *retaddr);
void eppic_pushenums(enum_t *et);
void eppic_addfunc_ctype(int idx);
void eppic_setapiglobs(void);
Expand All @@ -367,9 +369,9 @@ void eppic_addtolist(var_t*vl, var_t*v);
void eppic_arch_swapvals(void* vp, void *sp);
void eppic_fillst(stinfo_t *st);
void eppic_exememlocal(value_t *vp, stmember_t* stm, value_t *v);
void eppic_do_deref(int n, value_t *v, value_t *ref);
void eppic_addneg(char *name);
void eppic_print_type(type_t *t);
void eppic_vpush();
void eppic_vpop();

stmember_t*eppic_member(char *mname, type_t*tp);

Expand Down Expand Up @@ -445,6 +447,7 @@ int eppic_isenum(int atr);
int eppic_funcexists(char *name);
int eppic_isnew(void* p);
int eppic_isneg(char *name);
int eppicpperror(char *s);

char *eppic_vartofunc(node_t *name);
char *eppic_gettdefname(ull idx);
Expand All @@ -456,6 +459,7 @@ char *eppic_cursorp(void);
char *eppic_getbtypename(int typattr);
char *eppic_filename(void);
char *eppic_curp(char *);
char *eppic_getipath(void);

type_t *eppic_typeof(node_t *n);
type_t *eppic_newctype(int ctype_t, node_t *n);
Expand Down
4 changes: 2 additions & 2 deletions libeppic/eppic_alloc.c
Expand Up @@ -173,9 +173,9 @@ static int dir=0;
}

void
eppic_caller(char *p, void *retaddr)
eppic_caller(void *p, void *retaddr)
{
blist *bl=(blist*)(((char*)p)-SIZEBL);
blist *bl=(blist*)(p-SIZEBL);

bl->caller=retaddr;
}
Expand Down
1 change: 1 addition & 0 deletions libeppic/eppic_api.c
Expand Up @@ -23,6 +23,7 @@
#include <setjmp.h>
#include <pwd.h>
#include <string.h>
#include <stdlib.h>

/* here we do some caching of the information. This can have a speedup effect
since it limits the number of accesses we do the dwarf (or whatever type) db that
Expand Down
5 changes: 4 additions & 1 deletion libeppic/eppic_api.h
Expand Up @@ -208,7 +208,10 @@ void eppic_setarrbval(ARRAY_S*, int);
/* get the array element coresponding to index */
ARRAY_S *eppic_getarrval(ARRAY_S**, VALUE_S*);
/* get the initiale array for a variable */
ARRAY_S *eppic_addarrelem(ARRAY_S**, VALUE_S*, VALUE_S*);
ARRAY_S *eppic_addarrelem(ARRAY_S**, VALUE_S*, VALUE_S*);
/* dereference a pointer to its value */
void eppic_do_deref(int n, VALUE_S* v, VALUE_S* ref);
void eppic_addneg(char *name);

/* type manipulation */
int eppic_is_struct(int);
Expand Down
2 changes: 2 additions & 0 deletions libeppic/eppic_var.c
Expand Up @@ -828,6 +828,7 @@ var_t*v;
evaluation of sizeof or typeof.
*/
int eppic_getvlev() { return vlev; }
void
eppic_vpush()
{
if(vlev==S_MAXSDEEP) {
Expand All @@ -841,6 +842,7 @@ eppic_vpush()
}
}

void
eppic_vpop()
{
if(vlev) {
Expand Down

0 comments on commit 2f59c49

Please sign in to comment.