[#0x002A] a simple delegation example

本文介绍了一个简单的Java Servlet示例,其中doPost()方法委托给doGet()方法执行。这种委托模式常见于前后端开发中,有助于理解方法间的调用关系。

  如有下列代码:

public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException
{
	doGet(req, resp);
}

则称doPost() delegates to doGet()。delegate可以简单理解为give power to。

 

#0 0x002a888b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libstdc++.so.6 Missing separate debuginfos, use: debuginfo-install MySQL-shared-5.6.10-1.el6.i686 bzip2-libs-1.0.5-7.el6_0.i686 glibc-2.12-1.107.el6.i686 libgcc-4.4.7-3.el6.i686 libstdc++-4.4.7-3.el6.i686 zlib-1.2.3-29.el6.i686 (gdb) bt #0 0x002a888b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libstdc++.so.6 #1 0x082e2f52 in FuncPMProcess::recipeVerify (this=0x8e120a8, recipeType=3220179428, recipeName=Traceback (most recent call last): File "/usr/lib/../share/gdb/python/libstdcxx/v6/printers.py", line 558, in to_string return self.val[&#39;_M_dataplus&#39;][&#39;_M_p&#39;].lazy_string (length = len) RuntimeError: Cannot access memory at address 0x300f5cb3 , recipeVersion=Traceback (most recent call last): File "/usr/lib/../share/gdb/python/libstdcxx/v6/printers.py", line 558, in to_string return self.val[&#39;_M_dataplus&#39;][&#39;_M_p&#39;].lazy_string (length = len) RuntimeError: Cannot access memory at address 0xc389c079 ) at FuncPMProcess.cpp:229 #2 0x082e1518 in FuncPMProcess::initialize (this=0x8e120a8) at FuncPMProcess.cpp:95 #3 0x080b1ccc in TEST_GROUP_CppUTestGroupFuncPMProcess::setup (this=0x8e0e0c0) at /root/workspace/VDF_IAP_F5100/ut/../ut/vdf_test/PM_Test/Function_Test/Test_FuncPMProcess.cc:94 #4 0x081d9fa8 in PlatformSpecificSetJmpImplementation (function= 0x81d75a0 <helperDoTestSetup(void*)>, data=0x8e0e0c0) at src/Platforms/Gcc/UtestPlatform.cpp:144 分析以上栈信息
06-13
const uint16_t ASCII8x16_Table[] = { // ?? (0x20) 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // ! (0x21) 0x0000, 0x0000, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0010, 0x0000, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // " (0x22) 0x0000, 0x0000, 0x0028, 0x0028, 0x0028, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // # (0x23) 0x0000, 0x0014, 0x0038, 0x0054, 0x0050, 0x0038, 0x0014, 0x0014, 0x0054, 0x0038, 0x0014, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // $ (0x24) 0x0000, 0x0044, 0x00A8, 0x00A8, 0x0050, 0x0014, 0x001A, 0x002A, 0x0024, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // % (0x25) 0x0000, 0x0020, 0x0050, 0x0050, 0x0020, 0x00E8, 0x0098, 0x0098, 0x0060, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // & (0x26) 0x0000, 0x0080, 0x0080, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // &#39; (0x27) 0x0000, 0x0040, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0000, 0x0000, 0x0000, 0x0000, // ( (0x28) 0x0000, 0x0000, 0x0040, 0x00E0, 0x0040, 0x00A0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // ) (0x29) 0x0000, 0x0000, 0x0020, 0x0020, 0x00F8, 0x0020, 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // * (0x2A) 0x0000, 0x0000, 0x0010, 0x0038, 0x0054, 0x0050, 0x0038, 0x0014, 0x0014, 0x0054, 0x0038, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, // + (0x2B) 0x0000, 0x0000, 0x0044, 0x00A8, 0x00A8, 0x0050, 0x0014, 0x001A, 0x002A, 0x0024, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // , (0x2C) 0x0000, 0x0000, 0x0020, 0x0050, 0x0050, 0x0020, 0x00E8, 0x0098, 0x0098, 0x0060, 0x0000, 0x0000, 0x0生成的数字显示正确,英文字母和符号显示不全,比数字矮一点
05-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值