From b3b80ddc3347be23d2e2f5b1a89581aa9b2b14b7 Mon Sep 17 00:00:00 2001 From: Levente Orban Date: Thu, 27 Oct 2016 19:19:14 +0200 Subject: [PATCH] Add the structure of the debugger package JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu --- jerry-core/debugger/jerry-debugger.c | 1 + jerry-core/debugger/jerry-debugger.h | 39 ++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 jerry-core/debugger/jerry-debugger.c create mode 100644 jerry-core/debugger/jerry-debugger.h diff --git a/jerry-core/debugger/jerry-debugger.c b/jerry-core/debugger/jerry-debugger.c new file mode 100644 index 0000000000..81b8e49ae7 --- /dev/null +++ b/jerry-core/debugger/jerry-debugger.c @@ -0,0 +1 @@ +//TODO: Implement the socket communication diff --git a/jerry-core/debugger/jerry-debugger.h b/jerry-core/debugger/jerry-debugger.h new file mode 100644 index 0000000000..0b227847ee --- /dev/null +++ b/jerry-core/debugger/jerry-debugger.h @@ -0,0 +1,39 @@ +/* Copyright 2016 University of Szeged. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef JERRY_DEBUGGER_H +#define JERRY_DEBUGGER_H + +#define MAX_MESSAGE_SIZE 128 + +/** +* Package header +*/ +typdef struct +{ + uint8_t type; /**< type of the message */ + uint8_t size; /**< size of the message */ +} jerry_debug_message_header_t; + +/** +* Source file name +*/ +typdef struct +{ + jerry_debug_message_header header; /**< header of the source file name struct */ + char file_name[1]; /**< the message */ +} jerry_debug_message_source_name_t; + +#endif /* JERRY_DEBUGGER_H */