mirror of
https://github.com/JakeHillion/drgn.git
synced 2024-12-23 09:43:06 +00:00
8b264f8823
drgn was originally my side project, but for awhile now it's also been my work project. Update the copyright headers to reflect this, and add a copyright header to various files that were missing it.
34 lines
693 B
C
34 lines
693 B
C
// Copyright (c) Facebook, Inc. and its affiliates.
|
|
// SPDX-License-Identifier: GPL-3.0+
|
|
|
|
#include <string.h>
|
|
|
|
#include "internal.h"
|
|
#include "symbol.h"
|
|
|
|
LIBDRGN_PUBLIC void drgn_symbol_destroy(struct drgn_symbol *sym)
|
|
{
|
|
free(sym);
|
|
}
|
|
|
|
LIBDRGN_PUBLIC const char *drgn_symbol_name(struct drgn_symbol *sym)
|
|
{
|
|
return sym->name;
|
|
}
|
|
|
|
LIBDRGN_PUBLIC uint64_t drgn_symbol_address(struct drgn_symbol *sym)
|
|
{
|
|
return sym->address;
|
|
}
|
|
|
|
LIBDRGN_PUBLIC uint64_t drgn_symbol_size(struct drgn_symbol *sym)
|
|
{
|
|
return sym->size;
|
|
}
|
|
|
|
LIBDRGN_PUBLIC bool drgn_symbol_eq(struct drgn_symbol *a, struct drgn_symbol *b)
|
|
{
|
|
return (strcmp(a->name, b->name) == 0 && a->address == b->address &&
|
|
a->size == b->size);
|
|
}
|