git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1307800
)
Usermode/AxWin4 - Debugging quirks in ARCH=native
author
John Hodge (sonata)
<
[email protected]
>
Fri, 7 Nov 2014 02:47:49 +0000
(10:47 +0800)
committer
John Hodge (sonata)
<
[email protected]
>
Fri, 7 Nov 2014 02:47:49 +0000
(10:47 +0800)
Usermode/Applications/Makefile.cfg
patch
|
blob
|
history
Usermode/Applications/Makefile.tpl
patch
|
blob
|
history
Usermode/Applications/axwin4_src/Server/CIPCChannel_AcessIPCPipe.cpp
patch
|
blob
|
history
Usermode/Applications/axwin4_src/Server/Makefile
patch
|
blob
|
history
Usermode/Applications/axwin4_src/Server/draw_control.cpp
patch
|
blob
|
history
Usermode/Applications/axwin4_src/Server/ipc.cpp
patch
|
blob
|
history
Usermode/Libraries/ld-acess.so_src/include_exp/acess/_native_syscallmod.h
patch
|
blob
|
history
Usermode/Libraries/libaxwin4.so_src/window_drawing.cpp
patch
|
blob
|
history
Usermode/common_settings.mk
patch
|
blob
|
history
diff --git
a/Usermode/Applications/Makefile.cfg
b/Usermode/Applications/Makefile.cfg
index
f87736c
..
af5a5e4
100644
(file)
--- a/
Usermode/Applications/Makefile.cfg
+++ b/
Usermode/Applications/Makefile.cfg
@@
-7,17
+7,17
@@
include $(_appsdir)../Makefile.cfg
ifeq ($(ARCHDIR),native)
ASFLAGS = -felf
ifeq ($(ARCHDIR),native)
ASFLAGS = -felf
- LDFLAGS
= -L $(OUTPUTDIR)Libs
+ LDFLAGS
:=
LIBS := -lacess-native -lc_acess
#LIBGCC_PATH = $(ACESSDIR)/AcessNative/symbol_renames.ld
else
ASFLAGS = -felf
# LDFLAGS = -T $(OUTPUTDIR)Libs/acess.ld
LIBS := -lacess-native -lc_acess
#LIBGCC_PATH = $(ACESSDIR)/AcessNative/symbol_renames.ld
else
ASFLAGS = -felf
# LDFLAGS = -T $(OUTPUTDIR)Libs/acess.ld
- LDFLAGS
= -L $(OUTPUTDIR)Libs
+ LDFLAGS
:=
LIBS = -lld-acess
endif
LIBS = -lld-acess
endif
-LDFLAGS += -rpath-link $(OUTPUTDIR)Libs
+
#
LDFLAGS += -rpath-link $(OUTPUTDIR)Libs
CXXFLAGS += -std=gnu++11
CPPFLAGS +=
CFLAGS += -Wall
CXXFLAGS += -std=gnu++11
CPPFLAGS +=
CFLAGS += -Wall
diff --git
a/Usermode/Applications/Makefile.tpl
b/Usermode/Applications/Makefile.tpl
index
d1dcfcf
..
d72ac6a
100644
(file)
--- a/
Usermode/Applications/Makefile.tpl
+++ b/
Usermode/Applications/Makefile.tpl
@@
-20,7
+20,7
@@
_LIBS := $(filter -l%,$(LIBS))
_LIBS := $(patsubst -l%,$(OUTPUTDIR)Libs/lib%.so,$(_LIBS))
ifeq ($(ARCHDIR),native)
_LIBS := $(patsubst -l%,$(OUTPUTDIR)Libs/lib%.so,$(_LIBS))
ifeq ($(ARCHDIR),native)
- LDFLAGS :=
-L$(OUTPUTDIR)Libs/
$(patsubst -lc++,-lc++_acess,$(LDFLAGS))
+ LDFLAGS := $(patsubst -lc++,-lc++_acess,$(LDFLAGS))
LIBS := $(patsubst -lc++,-lc++_acess,$(LIBS))
endif
ifeq ($(VERBOSE),)
LIBS := $(patsubst -lc++,-lc++_acess,$(LIBS))
endif
ifeq ($(VERBOSE),)
diff --git
a/Usermode/Applications/axwin4_src/Server/CIPCChannel_AcessIPCPipe.cpp
b/Usermode/Applications/axwin4_src/Server/CIPCChannel_AcessIPCPipe.cpp
index
867c491
..
51d88b1
100644
(file)
--- a/
Usermode/Applications/axwin4_src/Server/CIPCChannel_AcessIPCPipe.cpp
+++ b/
Usermode/Applications/axwin4_src/Server/CIPCChannel_AcessIPCPipe.cpp
@@
-109,7
+109,7
@@
void CClient_AcessIPCPipe::HandleReceive()
if( len == (size_t)-1 )
throw ::std::system_error(errno, ::std::system_category());
//_SysDebug("CClient_AcessIPCPipe::HandleReceive - Rx %i/%i bytes", len, rxbuf.capacity());
if( len == (size_t)-1 )
throw ::std::system_error(errno, ::std::system_category());
//_SysDebug("CClient_AcessIPCPipe::HandleReceive - Rx %i/%i bytes", len, rxbuf.capacity());
-
//
_SysDebugHex("CClient_AcessIPCPipe::HandleReceive", rxbuf.data(), len);
+ _SysDebugHex("CClient_AcessIPCPipe::HandleReceive", rxbuf.data(), len);
rxbuf.resize(len);
CDeserialiser msg( ::std::move(rxbuf) );
rxbuf.resize(len);
CDeserialiser msg( ::std::move(rxbuf) );
diff --git
a/Usermode/Applications/axwin4_src/Server/Makefile
b/Usermode/Applications/axwin4_src/Server/Makefile
index
dfd4d0f
..
c7d7983
100644
(file)
--- a/
Usermode/Applications/axwin4_src/Server/Makefile
+++ b/
Usermode/Applications/axwin4_src/Server/Makefile
@@
-15,6
+15,7
@@
BIN := AxWinServer
LIBS += -lc++
CXXFLAGS += -O3
LIBS += -lc++
CXXFLAGS += -O3
+USE_CXX_LINK = 1
include ../../Makefile.tpl
include ../../Makefile.tpl
diff --git
a/Usermode/Applications/axwin4_src/Server/draw_control.cpp
b/Usermode/Applications/axwin4_src/Server/draw_control.cpp
index
59ea0bc
..
c3e54e1
100644
(file)
--- a/
Usermode/Applications/axwin4_src/Server/draw_control.cpp
+++ b/
Usermode/Applications/axwin4_src/Server/draw_control.cpp
@@
-9,6
+9,8
@@
*/
#include <draw_control.hpp>
#include <axwin4/definitions.h>
*/
#include <draw_control.hpp>
#include <axwin4/definitions.h>
+#include <acess/sys.h>
+#include <cassert>
// === CODE ===
namespace AxWin {
// === CODE ===
namespace AxWin {
@@
-22,7
+24,8
@@
CControl::CControl(int EdgeX, int FillX, int InnerX, int EdgeY, int FillY, int I
m_inner_y(InnerY),
m_data(data)
{
m_inner_y(InnerY),
m_data(data)
{
-
+ _SysDebug("CControl(X={E:%i,F:%i,I:%i}, Y={E:%i,F:%i,I:%i}, data={Size:%i})",
+ m_edge_x, m_fill_x, m_inner_x, m_edge_y, m_fill_y, m_inner_y, m_data.size());
}
void CControl::Render(CSurface& dest, const CRect& rect) const
}
void CControl::Render(CSurface& dest, const CRect& rect) const
@@
-46,6
+49,7
@@
void CControl::Render(CSurface& dest, const CRect& rect) const
renderLine(dest, y++, scanline, rect, &m_data[(base_ofs+i)*ctrl_width]);
base_ofs += m_edge_y;
// FillY
renderLine(dest, y++, scanline, rect, &m_data[(base_ofs+i)*ctrl_width]);
base_ofs += m_edge_y;
// FillY
+ assert(m_fill_y > 0 || y == top_fill_end);
while( y < top_fill_end )
{
for( int i = 0; i < m_fill_y && y < top_fill_end; i ++ )
while( y < top_fill_end )
{
for( int i = 0; i < m_fill_y && y < top_fill_end; i ++ )
@@
-78,6
+82,7
@@
void CControl::Render(CSurface& dest, const CRect& rect) const
void CControl::renderLine(CSurface& dest, int y, ::std::vector<uint32_t>& scanline, const CRect& rect, const uint32_t* ctrl_line) const
{
void CControl::renderLine(CSurface& dest, int y, ::std::vector<uint32_t>& scanline, const CRect& rect, const uint32_t* ctrl_line) const
{
+ _SysDebug("renderLine: (y=%i,rect={(%i,%i) %ix%i}", y, rect.m_x, rect.m_y, rect.m_w, rect.m_h);
const int left_fill_end = rect.m_w / 2 - m_inner_x;
const int right_fill_end = rect.m_w - m_edge_x;
const int left_fill_end = rect.m_w / 2 - m_inner_x;
const int right_fill_end = rect.m_w - m_edge_x;
diff --git
a/Usermode/Applications/axwin4_src/Server/ipc.cpp
b/Usermode/Applications/axwin4_src/Server/ipc.cpp
index
4ed0352
..
d042da9
100644
(file)
--- a/
Usermode/Applications/axwin4_src/Server/ipc.cpp
+++ b/
Usermode/Applications/axwin4_src/Server/ipc.cpp
@@
-276,7
+276,7
@@
void HandleMessage_PushData(CClient& client, CDeserialiser& message)
uint16_t y = message.ReadU16();
uint16_t w = message.ReadU16();
uint16_t h = message.ReadU16();
uint16_t y = message.ReadU16();
uint16_t w = message.ReadU16();
uint16_t h = message.ReadU16();
-
//
_SysDebug("_PushData: (%i, (%i,%i) %ix%i)", win_id, x, y, w, h);
+ _SysDebug("_PushData: (%i, (%i,%i) %ix%i)", win_id, x, y, w, h);
CWindow* win = client.GetWindow(win_id);
if(!win) {
CWindow* win = client.GetWindow(win_id);
if(!win) {
@@
-307,6
+307,7
@@
void HandleMessage_DrawCtl(CClient& client, CDeserialiser& message)
uint16_t h = message.ReadU16();
uint16_t ctrl_id = message.ReadU16();
uint16_t frame = message.ReadU16();
uint16_t h = message.ReadU16();
uint16_t ctrl_id = message.ReadU16();
uint16_t frame = message.ReadU16();
+ _SysDebug("_DrawCtl: (%i, (%i,%i) %ix%i %i %06x)", win_id, x, y, w, h, ctrl_id, frame);
CWindow* win = client.GetWindow(win_id);
if(!win) {
CWindow* win = client.GetWindow(win_id);
if(!win) {
diff --git
a/Usermode/Libraries/ld-acess.so_src/include_exp/acess/_native_syscallmod.h
b/Usermode/Libraries/ld-acess.so_src/include_exp/acess/_native_syscallmod.h
index
0b38690
..
b3d78bf
100644
(file)
--- a/
Usermode/Libraries/ld-acess.so_src/include_exp/acess/_native_syscallmod.h
+++ b/
Usermode/Libraries/ld-acess.so_src/include_exp/acess/_native_syscallmod.h
@@
-24,6
+24,7
@@
#define _SysUnloadBin acess__SysUnloadBin
#define _SysSetFaultHandler acess__SysSetFaultHandler
#define _SysDebug acess__SysDebug
#define _SysUnloadBin acess__SysUnloadBin
#define _SysSetFaultHandler acess__SysSetFaultHandler
#define _SysDebug acess__SysDebug
+#define _SysDebugHex acess__SysDebugHex
#define _SysGetPhys acess__SysGetPhys
#define _SysAllocate acess__SysAllocate
#define _SysSetMemFlags acess__SysSetMemFlags
#define _SysGetPhys acess__SysGetPhys
#define _SysAllocate acess__SysAllocate
#define _SysSetMemFlags acess__SysSetMemFlags
diff --git
a/Usermode/Libraries/libaxwin4.so_src/window_drawing.cpp
b/Usermode/Libraries/libaxwin4.so_src/window_drawing.cpp
index
40f55a0
..
8f355a6
100644
(file)
--- a/
Usermode/Libraries/libaxwin4.so_src/window_drawing.cpp
+++ b/
Usermode/Libraries/libaxwin4.so_src/window_drawing.cpp
@@
-48,6
+48,7
@@
extern "C" void AxWin4_DrawBitmap(tAxWin4_Window *Window, int X, int Y, unsigned
extern "C" void AxWin4_DrawControl(tAxWin4_Window *Window, int X, int Y, unsigned int W, unsigned int H, uint16_t ID, unsigned int Frame)
{
CSerialiser message;
extern "C" void AxWin4_DrawControl(tAxWin4_Window *Window, int X, int Y, unsigned int W, unsigned int H, uint16_t ID, unsigned int Frame)
{
CSerialiser message;
+ //_SysDebug("AxWin4_DrawControl: (Window->ID=%i, (%i,%i) %ix%i %i 0x%06x", Window->m_id, X, Y, W, H, ID, Frame);
message.WriteU8(IPCMSG_DRAWCTL);
message.WriteU16(Window->m_id);
message.WriteU16(X);
message.WriteU8(IPCMSG_DRAWCTL);
message.WriteU16(Window->m_id);
message.WriteU16(X);
diff --git
a/Usermode/common_settings.mk
b/Usermode/common_settings.mk
index
e6f9231
..
2f6fa8f
100644
(file)
--- a/
Usermode/common_settings.mk
+++ b/
Usermode/common_settings.mk
@@
-5,6
+5,7
@@
CPPFLAGS += -I$(ACESSUSERDIR)/include/ -DARCHDIR_is_$(ARCHDIR)
CPPFLAGS += -I $(ACESSDIR)/Externals/Output/$(ARCHDIR)/include
CFLAGS += -std=gnu99 -g
LDFLAGS += -L $(ACESSDIR)/Externals/Output/$(ARCHDIR)/lib
CPPFLAGS += -I $(ACESSDIR)/Externals/Output/$(ARCHDIR)/include
CFLAGS += -std=gnu99 -g
LDFLAGS += -L $(ACESSDIR)/Externals/Output/$(ARCHDIR)/lib
+LDFLAGS += -L $(OUTPUTDIR)Libs
CRTI := $(OUTPUTDIR)Libs/crti.o
CRTBEGIN := $(shell $(CC) $(CFLAGS) -print-file-name=crtbegin.o 2>/dev/null)
CRTI := $(OUTPUTDIR)Libs/crti.o
CRTBEGIN := $(shell $(CC) $(CFLAGS) -print-file-name=crtbegin.o 2>/dev/null)
UCC
git Repository :: git.ucc.asn.au