Skip to main content
summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorjguiban2013-11-28 11:45:26 -0500
committerGerrit Code Review @ Eclipse.org2013-12-10 14:54:30 -0500
commit2024b379d6d75a98052f0acfc8472071fd898b42 (patch)
tree5166941a8a0bc2ffac1f47c37eac873a96b8556c /server
parente2caf28deb97bb821ab464eb6865a5f3e6ad1050 (diff)
downloadorg.eclipse.tcf.agent-2024b379d6d75a98052f0acfc8472071fd898b42.tar.gz
org.eclipse.tcf.agent-2024b379d6d75a98052f0acfc8472071fd898b42.tar.xz
org.eclipse.tcf.agent-2024b379d6d75a98052f0acfc8472071fd898b42.zip
Bug 422781: Extend ISA data provided by runcontrol
This commit extends the data provided by the runcontrol layer with: - opcode memory alignment - max size of opcode for an assembly instruction By providing these data, the runconrol layer can overwrite default value MAX_INSTRUCTION_SIZE and DEFAULT_ALIGMENT, even if no symbol is available. Signed-off-by: jguiban <jerome.guiban@windriver.com>
Diffstat (limited to 'server')
-rw-r--r--server/tcf/services/context-proxy.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/tcf/services/context-proxy.c b/server/tcf/services/context-proxy.c
index 8280be26..3697f104 100644
--- a/server/tcf/services/context-proxy.c
+++ b/server/tcf/services/context-proxy.c
@@ -187,6 +187,8 @@ struct DefIsaCache {
ContextAddress addr;
int isa_valid;
char * def_isa;
+ ContextAddress max_instruction_size;
+ ContextAddress alignment;
ReplyHandlerInfo * pending;
int disposed;
};
@@ -1896,6 +1898,12 @@ static void read_isa_attr(InputStream * inp, const char * nm, void * args) {
if (strcmp(nm, "DefISA") == 0) {
i->def_isa = json_read_alloc_string(inp);
}
+ else if (strcmp(nm, "MaxInstrSize") == 0) {
+ i->max_instruction_size = json_read_ulong(inp);
+ }
+ else if (strcmp(nm, "Alignment") == 0) {
+ i->alignment = json_read_ulong(inp);
+ }
else {
json_skip_object(inp);
}
@@ -1949,6 +1957,8 @@ static int get_context_defisa_from_rc (Context * ctx, ContextISA * isa) {
if (i->isa_valid) {
if (i->def_isa != NULL) isa->def = loc_strdup(i->def_isa);
+ isa->alignment = i->alignment;
+ isa->max_instruction_size = i->max_instruction_size;
set_error_report_errno(i->error);
clear_trap(&trap);
return !errno ? 0 : -1;

Back to the top